Skip to content

Commit 74d5cf9

Browse files
committed
Update Player script methods to use the newly implemented parameters by ref
1 parent a7a4732 commit 74d5cf9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Scripts/PlayerScript.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class PythonPlayerScript : public PlayerScript
4848
*/
4949
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* victim, uint8 xpSource) override
5050
{
51-
TRIGGER_PLAYER_HOOK(ON_GIVE_EXP, player, amount, victim, xpSource);
51+
TRIGGER_PLAYER_HOOK(ON_GIVE_EXP, player, std::ref(amount), victim, xpSource);
5252
}
5353

5454
/**
@@ -70,7 +70,7 @@ class PythonPlayerScript : public PlayerScript
7070
*/
7171
void OnPlayerMoneyChanged(Player* player, int32& amount) override
7272
{
73-
TRIGGER_PLAYER_HOOK(ON_MONEY_CHANGED, player, amount);
73+
TRIGGER_PLAYER_HOOK(ON_MONEY_CHANGED, player, std::ref(amount));
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)