Advertisement
Guest User

c++ PVP KILL QUEST Eatos!

a guest
Dec 14th, 2012
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement