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 OnGossipSelect (Player *, Creature *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, char const *)
 
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 CreatureAI * GetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- Public Member Functions inherited from ScriptObject
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
std::string const & 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 (char const *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *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
583: 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.

586 {
587 switch (creature->GetEntry())
588 {
590 {
591 uint32 essenceId = 0;
592 uint32 effect2Id = 0;
593 //uint32 empoweredId = 0;
594 uint32 touchId1 = 0;
595 //uint32 touchId2 = 0;
596 switch (creature->GetMap()->GetDifficulty())
597 {
598 case 0:
599 essenceId = 65684;
600 //empoweredId = 65724;
601 touchId1 = 65950;
602 //touchId2 = 66001;
603 effect2Id = 65827;
604 break;
605 case 1:
606 essenceId = 67176;
607 //empoweredId = 67213;
608 touchId1 = 67296;
609 //touchId2 = 67281;
610 effect2Id = 67179;
611 break;
612 case 2:
613 essenceId = 67177;
614 //empoweredId = 67214;
615 touchId1 = 67297;
616 //touchId2 = 67282;
617 effect2Id = 67180;
618 break;
619 case 3:
620 essenceId = 67178;
621 //empoweredId = 67215;
622 touchId1 = 67298;
623 //touchId2 = 67283;
624 effect2Id = 67181;
625 break;
626 }
627 player->RemoveAura(essenceId);
628 player->RemoveAura(effect2Id);
629 player->RemoveAura(touchId1);
630 //player->RemoveAura(touchId2); // dont remove black touch here - only white can have black touch - so white changing to white - so no change of color
631 //player->RemoveAura(empoweredId); // apply new empowered?
632 player->CastSpell(player, SPELL_LIGHT_ESSENCE, true);
633 }
634 break;
635 case NPC_DARK_ESSENCE:
636 {
637 uint32 essenceId = 0;
638 uint32 effect2Id = 0;
639 //uint32 empoweredId = 0;
640 //uint32 touchId1 = 0;
641 uint32 touchId2 = 0;
642 switch (creature->GetMap()->GetDifficulty())
643 {
644 case 0:
645 essenceId = 65686;
646 //empoweredId = 65748;
647 //touchId1 = 65950;
648 touchId2 = 66001;
649 effect2Id = 65811;
650 break;
651 case 1:
652 essenceId = 67222;
653 //empoweredId = 67216;
654 //touchId1 = 67296;
655 touchId2 = 67281;
656 effect2Id = 67511;
657 break;
658 case 2:
659 essenceId = 67223;
660 //empoweredId = 67217;
661 //touchId1 = 67297;
662 touchId2 = 67282;
663 effect2Id = 67512;
664 break;
665 case 3:
666 essenceId = 67224;
667 //empoweredId = 67218;
668 //touchId1 = 67298;
669 touchId2 = 67283;
670 effect2Id = 67513;
671 break;
672 }
673 player->RemoveAura(essenceId);
674 player->RemoveAura(effect2Id);
675 //player->RemoveAura(touchId1); // dont remove white touch here - only black can have white touch - so black changing to black - so no change of color
676 player->RemoveAura(touchId2);
677 //player->RemoveAura(empoweredId); // apply new empowered?
678 player->CastSpell(player, SPELL_DARK_ESSENCE, true);
679 }
680 break;
681 default:
682 break;
683 }
684 CloseGossipMenuFor(player);
685 return true;
686 }
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
Difficulty GetDifficulty() const
Definition Map.h:294
uint32 GetEntry() const
Definition Object.h:123
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4830
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:1378
Map * GetMap() const
Definition Object.h:637

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.


The documentation for this class was generated from the following file: