File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1+ #include " AccountMgr.h"
2+ #include " Chat.h"
13#include " Configuration/Config.h"
2- #include " Player.h"
34#include " Creature.h"
4- #include " AccountMgr.h"
5- #include " ScriptMgr.h"
65#include " Define.h"
76#include " GossipDef.h"
8- #include " Pet.h"
97#include " LootMgr.h"
10- #include " Chat.h"
8+ #include " Pet.h"
9+ #include " Player.h"
10+ #include " ScriptMgr.h"
1111
1212uint32 SummonChest, KillAnnounce;
1313bool spawnchestIP;
@@ -17,7 +17,10 @@ std::vector<uint32> AreatoIgnore = { 1741 /*Gurubashi*/, 2177 };
1717class PvPScript : public PlayerScript
1818{
1919public:
20- PvPScript () : PlayerScript(" PvPScript" ) {}
20+ PvPScript () : PlayerScript(" PvPScript" , {
21+ PLAYERHOOK_ON_PLAYER_KILLED_BY_CREATURE,
22+ PLAYERHOOK_ON_PVP_KILL
23+ }) {}
2124
2225 void OnPlayerKilledByCreature (Creature* killer, Player* killed/* , bool& durabilityLoss*/ )
2326 {
@@ -33,10 +36,8 @@ class PvPScript : public PlayerScript
3336 if (spawnchestIP)
3437 if (Pet* pet = killer->ToPet ())
3538 if (Player* owner = pet->GetOwner ())
36- {
3739 if (!CheckConditions (owner, killed))
3840 return ;
39- }
4041
4142 if (!CheckConditions (nullptr , killed))
4243 return ;
@@ -49,7 +50,7 @@ class PvPScript : public PlayerScript
4950 }
5051 }
5152
52- void OnPVPKill (Player* killer, Player* killed)
53+ void OnPlayerPVPKill (Player* killer, Player* killed)
5354 {
5455 if (!sConfigMgr ->GetOption <bool >(" PvPChest" , true ))
5556 return ;
You can’t perform that action at this time.
0 commit comments