midoking

Trinity Require PVP Quest

Jan 12th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2. #include "QuestDef.h"
  3.  
  4. class KillCount_OnPvPKill : public PlayerScript
  5. {
  6.     public:
  7.         KillCount_OnPvPKill() : PlayerScript("KillCount_OnPvPKill") {}
  8.  
  9.        
  10. void OnPVPKill(Player *pKiller, Player *pVictim)
  11. {
  12.     if(pKiller->hasQuest(88820))
  13.     {
  14.         Quest const* qInfo = sObjectMgr->GetQuestTemplate(88820);
  15.         if (!qInfo)
  16.              return;
  17.         QuestStatus status = pKiller->GetQuestStatus(88820);
  18.         if (status == QUEST_STATUS_INCOMPLETE)
  19.         {
  20.              pKiller->KilledPlayerCredit();
  21.         }
  22.     }
  23. }
  24.  
  25. };
  26.  
  27. void AddSC_System()
  28. {
  29.     new KillCount_OnPvPKill;
  30. }
Add Comment
Please, Sign In to add comment