TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_matrix_punchograph Class Reference

Public Member Functions

 go_matrix_punchograph ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

go_matrix_punchograph::go_matrix_punchograph ( )
inline
594 : GameObjectScript("go_matrix_punchograph") { }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

bool go_matrix_punchograph::OnGossipHello ( Player player,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

597  {
598  switch (go->GetEntry())
599  {
601  if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD))
602  {
603  player->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true);
604  player->CastSpell(player, SPELL_YELLOW_PUNCH_CARD, true);
605  }
606  break;
608  if (player->HasItemCount(ITEM_YELLOW_PUNCH_CARD))
609  {
610  player->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true);
611  player->CastSpell(player, SPELL_BLUE_PUNCH_CARD, true);
612  }
613  break;
615  if (player->HasItemCount(ITEM_BLUE_PUNCH_CARD))
616  {
617  player->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true);
618  player->CastSpell(player, SPELL_RED_PUNCH_CARD, true);
619  }
620  break;
622  if (player->HasItemCount(ITEM_RED_PUNCH_CARD))
623  {
624  player->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true);
625  player->CastSpell(player, SPELL_PRISMATIC_PUNCH_CARD, true);
626  }
627  break;
628  default:
629  break;
630  }
631  return false;
632  }
Definition: go_scripts.cpp:587
Definition: go_scripts.cpp:582
Definition: go_scripts.cpp:586
Definition: go_scripts.cpp:579
Definition: go_scripts.cpp:577
Definition: go_scripts.cpp:581
Definition: go_scripts.cpp:585
Definition: go_scripts.cpp:578
Definition: go_scripts.cpp:584
Definition: go_scripts.cpp:583
Definition: go_scripts.cpp:588
Definition: go_scripts.cpp:576
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:


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