Add OnPlayerChangeInventory server script callback

coverity_scan^2
David Cernat 8 years ago
parent 6ff47bbde9
commit 107dacac6d

@ -225,6 +225,9 @@ void Networking::ProcessPlayerPacket(RakNet::Packet *packet)
{
DEBUG_PRINTF("ID_GAME_INVENTORY\n");
myPacket->Read(player);
Script::Call<Script::CallbackIdentity("OnPlayerChangeInventory")>(player->GetID());
break;
}

@ -105,6 +105,7 @@ public:
{"OnPlayerChangeSkills", Function<void, unsigned short>()},
{"OnPlayerChangeLevel", Function<void, unsigned short>()},
{"OnPlayerChangeEquipment", Function<void, unsigned short>()},
{"OnPlayerChangeInventory", Function<void, unsigned short>()},
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
{"OnGUIAction", Function<void, unsigned short, int, const char*>()}

@ -59,11 +59,11 @@ void LocalPlayer::Update()
updateAttackState();
updateDeadState();
updateEquipped();
updateInventory();
updateDynamicStats();
updateAttributes();
updateSkills();
updateLevel();
updateInventory();
}
void LocalPlayer::charGen(int stageFirst, int stageEnd)

Loading…
Cancel
Save