Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.52 KB | None | 0 0
  1. // npc_kali_remik
  2. // npc_talvash_del_kissel
  3.  
  4. /*########
  5. # npc_kali_remik
  6. #########*/
  7.  
  8. enum
  9. {
  10.     NPC_KALI_REMIK = 11814;
  11.     QUEST_DARKSPEAR_GUMDROP = 8358;
  12.     EMOTE_TRAIN_COMPLETE_H = -100104;
  13. };
  14.  
  15. struct MANGOS_DLL_DECL npc_kali_remikAI : public ScriptedAI
  16. {
  17.         npc_kali_remikAI(Creature* pCreature) : ScriptedAI(pCreature)
  18.     {
  19.         Reset();
  20.     }
  21.  
  22.         void Reset() {}
  23.  
  24.     void ReceiveEmote(Player* pPlayer, uint32 uiEmote)
  25.         {
  26.             if (uiEmote == TEXTEMOTE_TRAIN)
  27.             {
  28.                     if (pPlayer->GetQuestStatus(QUEST_DARKSPEAR_GUMDROP) == QUEST_STATUS_INCOMPLETE && pCreature->GetEntry() == NPC_KALI_REMIK)
  29.                     {
  30.                 DoScriptText(EMOTE_TRAIN_COMPLETE_H, m_creature);
  31.                 pPlayer->AreaExploredOrEventHappens(QUEST_DARKSPEAR_GUMDROP);
  32.                     }
  33.             }
  34.     }
  35.  
  36.     void UpdateAI(const uint32 uiDiff)
  37.     {
  38.             if (m_creature->SelectHostileTarget() && m_creature->getVictim())
  39.                 {
  40.             DoMeleeAttackIfReady();
  41.         }
  42.         }
  43. };
  44.  
  45. CreatureAI* GetAI_npc_kali_remik(Creature* pCreature)
  46. {
  47.     return new npc_kali_remikAI(pCreature);
  48. }
  49.  
  50. // Ceci vient après
  51.     newscript = new Script;
  52.     newscript->Name = "npc_kali_remik";
  53.     newscript->GetAI = &GetAI_npc_kali_remik;
  54.     newscript->RegisterSelf();
  55.  
  56. /*########
  57. # npc_talvash_del_kissel
  58. #########*/
  59.  
  60. enum
  61. {
  62.     NPC_TALVASH_DEL_KISSEL = 6826;
  63.     QUEST_GNOMEREGAN_GUMDROP = 8355;
  64.     EMOTE_TRAIN_COMPLETE_A = -100105;
  65. };
  66.  
  67. struct MANGOS_DLL_DECL npc_talvash_del_kisselAI : public ScriptedAI
  68. {
  69.         npc_talvash_del_kisselAI(Creature* pCreature) : ScriptedAI(pCreature)
  70.     {
  71.         Reset();
  72.     }
  73.  
  74.         void Reset() {}
  75.  
  76.     void ReceiveEmote(Player* pPlayer, uint32 uiEmote)
  77.         {
  78.             if (uiEmote == TEXTEMOTE_TRAIN)
  79.             {
  80.                     if (pPlayer->GetQuestStatus(QUEST_DARKSPEAR_GUMDROP) == QUEST_STATUS_INCOMPLETE && pCreature->GetEntry() == NPC_TALVASH_DEL_KISSEL)
  81.                     {
  82.                 DoScriptText(EMOTE_TRAIN_COMPLETE_H, m_creature);
  83.                 pPlayer->AreaExploredOrEventHappens(QUEST_DARKSPEAR_GUMDROP);
  84.                     }
  85.             }
  86.     }
  87.  
  88.     void UpdateAI(const uint32 uiDiff)
  89.     {
  90.             if (m_creature->SelectHostileTarget() && m_creature->getVictim())
  91.                 {
  92.             DoMeleeAttackIfReady();
  93.         }
  94.         }
  95. };
  96.  
  97. CreatureAI* GetAI_npc_talvash_del_kissel(Creature* pCreature)
  98. {
  99.     return new npc_talvash_del_kisselAI(pCreature);
  100. }
  101.  
  102. // Ceci vient après
  103.     newscript = new Script;
  104.     newscript->Name = "npc_talvash_del_kissel";
  105.     newscript->GetAI = &GetAI_npc_talvash_del_kissel;
  106.     newscript->RegisterSelf();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement