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
 
- 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)
 
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
574: CreatureScript("npc_essence_of_twin") { }
Definition: ScriptMgr.h:719

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

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

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.