View Single Post
  #4  
Old 11-16-2018, 02:12 PM
irongut_av's Avatar
irongut_av
Fire Beetle
 
Join Date: Sep 2018
Posts: 20
Default

Looks like I figured out the problem:

zone/lua_client.h
Code:
bool TakeMoneyFromPP(uint64 copper);
bool TakeMoneyFromPP(uint64 copper, bool update_client);
When I changed the param from uint64 to uint32, as well as the lua binding call from uint64 to uint32 , it worked.

The wrapped client function still uses uint64, so I just a cast inside of it:

Code:
…
bool Lua_Client::TakeMoneyFromPP(uint32 copper)
{
	Lua_Safe_Call_Bool();
	return self->TakeMoneyFromPP(static_cast<uint64>(copper));
}

bool Lua_Client::TakeMoneyFromPP(uint32 copper, bool update_client)
{
	Lua_Safe_Call_Bool();
	return self->TakeMoneyFromPP(static_cast<uint64>(copper), update_client);
}
…

.def("TakeMoneyFromPP", (bool(Lua_Client::*)(uint32))&Lua_Client::TakeMoneyFromPP)
.def("TakeMoneyFromPP", (bool(Lua_Client::*)(uint32, bool))&Lua_Client::TakeMoneyFromPP)
...
Reply With Quote