Working on Portals, related questions
#3
The OnBlockPlace() callback has a completely different signature since the repacketing; I thought I've written that somewhere, but obviously I've forgotten.

These are the signatures in C++, they should be directly equivalent to the callbacks (taken from cPlugin_NewLua.h, left out the C++ specifiers):
Code:
bool OnBlockDig (cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, char a_Status, BLOCKTYPE a_OldBlock, NIBBLETYPE a_OldMeta); bool OnBlockPlace (cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, const cItem & a_HeldItem); bool OnBlockToPickup (BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, const cPlayer * a_Player, const cItem & a_EquippedItem, cItems & a_Pickups); bool OnChat (cPlayer * a_Player, const AString & a_Message); void OnChunkGenerated (cWorld * a_World, int a_ChunkX, int a_ChunkZ); bool OnChunkGenerating (cWorld * a_World, int a_ChunkX, int a_ChunkZ, cLuaChunk * a_pLuaChunk ); bool OnCollectPickup (cPlayer * a_Player, cPickup * a_Pickup); bool OnCraftingNoRecipe(const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe); bool OnDisconnect (cPlayer * a_Player, const AString & a_Reason); bool OnKilled (cPawn* a_Killed, cEntity* a_Killer ); bool OnLogin (cClientHandle * a_Client, int a_ProtocolVersion, const AString & a_Username); bool OnPlayerJoin (cPlayer* a_Player ); void OnPlayerMove (cPlayer* a_Player ); void OnPlayerSpawn (cPlayer* a_Player ); bool OnPostCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe); bool OnPreCrafting (const cPlayer * a_Player, const cCraftingGrid * a_Grid, cCraftingRecipe * a_Recipe); void OnTakeDamage (cPawn* a_Pawn, TakeDamageInfo* a_TakeDamageInfo ); bool OnUpdatedSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4, cPlayer * a_Player); bool OnUpdatingSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4, cPlayer * a_Player); bool OnWeatherChanged (cWorld * a_World);
Reply
Thanks given by: Taugeshtu


Messages In This Thread
RE: Working on Portals, related questions - by xoft - 09-03-2012, 04:05 AM



Users browsing this thread: 2 Guest(s)