AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_essence_of_twin Class Reference
Inheritance diagram for npc_essence_of_twin:
CreatureScript ScriptObject UpdatableScript< Creature >

Public Member Functions

 npc_essence_of_twin ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
- Public Member Functions inherited from CreatureScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_essence_of_twin()

npc_essence_of_twin::npc_essence_of_twin ( )
inline
572: CreatureScript("npc_essence_of_twin") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool npc_essence_of_twin::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

575 {
576 switch (creature->GetEntry())
577 {
579 {
580 uint32 essenceId = 0;
581 uint32 effect2Id = 0;
582 //uint32 empoweredId = 0;
583 uint32 touchId1 = 0;
584 //uint32 touchId2 = 0;
585 switch (creature->GetMap()->GetDifficulty())
586 {
587 case 0:
588 essenceId = 65684;
589 //empoweredId = 65724;
590 touchId1 = 65950;
591 //touchId2 = 66001;
592 effect2Id = 65827;
593 break;
594 case 1:
595 essenceId = 67176;
596 //empoweredId = 67213;
597 touchId1 = 67296;
598 //touchId2 = 67281;
599 effect2Id = 67179;
600 break;
601 case 2:
602 essenceId = 67177;
603 //empoweredId = 67214;
604 touchId1 = 67297;
605 //touchId2 = 67282;
606 effect2Id = 67180;
607 break;
608 case 3:
609 essenceId = 67178;
610 //empoweredId = 67215;
611 touchId1 = 67298;
612 //touchId2 = 67283;
613 effect2Id = 67181;
614 break;
615 }
616 player->RemoveAura(essenceId);
617 player->RemoveAura(effect2Id);
618 player->RemoveAura(touchId1);
619 //player->RemoveAura(touchId2); // dont remove black touch here - only white can have black touch - so white changing to white - so no change of color
620 //player->RemoveAura(empoweredId); // apply new empowered?
621 player->CastSpell(player, SPELL_LIGHT_ESSENCE, true);
622 }
623 break;
624 case NPC_DARK_ESSENCE:
625 {
626 uint32 essenceId = 0;
627 uint32 effect2Id = 0;
628 //uint32 empoweredId = 0;
629 //uint32 touchId1 = 0;
630 uint32 touchId2 = 0;
631 switch (creature->GetMap()->GetDifficulty())
632 {
633 case 0:
634 essenceId = 65686;
635 //empoweredId = 65748;
636 //touchId1 = 65950;
637 touchId2 = 66001;
638 effect2Id = 65811;
639 break;
640 case 1:
641 essenceId = 67222;
642 //empoweredId = 67216;
643 //touchId1 = 67296;
644 touchId2 = 67281;
645 effect2Id = 67511;
646 break;
647 case 2:
648 essenceId = 67223;
649 //empoweredId = 67217;
650 //touchId1 = 67297;
651 touchId2 = 67282;
652 effect2Id = 67512;
653 break;
654 case 3:
655 essenceId = 67224;
656 //empoweredId = 67218;
657 //touchId1 = 67298;
658 touchId2 = 67283;
659 effect2Id = 67513;
660 break;
661 }
662 player->RemoveAura(essenceId);
663 player->RemoveAura(effect2Id);
664 //player->RemoveAura(touchId1); // dont remove white touch here - only black can have white touch - so black changing to black - so no change of color
665 player->RemoveAura(touchId2);
666 //player->RemoveAura(empoweredId); // apply new empowered?
667 player->CastSpell(player, SPELL_DARK_ESSENCE, true);
668 }
669 break;
670 default:
671 break;
672 }
673 CloseGossipMenuFor(player);
674 return true;
675 }
std::uint32_t uint32
Definition: Define.h:107
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ NPC_LIGHT_ESSENCE
Definition: boss_twin_valkyr.cpp:57
@ NPC_DARK_ESSENCE
Definition: boss_twin_valkyr.cpp:56
@ SPELL_LIGHT_ESSENCE
Definition: boss_twin_valkyr.cpp:64
@ SPELL_DARK_ESSENCE
Definition: boss_twin_valkyr.cpp:66
uint32 GetEntry() const
Definition: Object.h:112
Map * GetMap() const
Definition: Object.h:531
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4758
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
Difficulty GetDifficulty() const
Definition: Map.h:443

References Unit::CastSpell(), CloseGossipMenuFor(), Map::GetDifficulty(), Object::GetEntry(), WorldObject::GetMap(), NPC_DARK_ESSENCE, NPC_LIGHT_ESSENCE, Unit::RemoveAura(), SPELL_DARK_ESSENCE, and SPELL_LIGHT_ESSENCE.