diff --git a/src/Eggs.cpp b/src/Eggs.cpp index 20f9b45..683582d 100644 --- a/src/Eggs.cpp +++ b/src/Eggs.cpp @@ -143,10 +143,10 @@ static void eggStep(CNServer* serv, time_t currTime) { } -void Eggs::npcDataToEggData(sNPCAppearanceData* npc, sShinyAppearanceData* egg) { - egg->iX = npc->iX; - egg->iY = npc->iY; - egg->iZ = npc->iZ; +void Eggs::npcDataToEggData(int x, int y, int z, sNPCAppearanceData* npc, sShinyAppearanceData* egg) { + egg->iX = x; + egg->iY = y; + egg->iZ = z; // client doesn't care about egg->iMapNum egg->iShinyType = npc->iNPCType; egg->iShiny_ID = npc->iNPC_ID; diff --git a/src/Eggs.hpp b/src/Eggs.hpp index 2e5a782..2155272 100644 --- a/src/Eggs.hpp +++ b/src/Eggs.hpp @@ -18,5 +18,5 @@ namespace Eggs { /// returns -1 on fail int eggBuffPlayer(CNSocket* sock, int skillId, int eggId, int duration); - void npcDataToEggData(sNPCAppearanceData* npc, sShinyAppearanceData* egg); + void npcDataToEggData(int x, int y, int z, sNPCAppearanceData* npc, sShinyAppearanceData* egg); } diff --git a/src/Entities.cpp b/src/Entities.cpp index f0597af..973a78c 100644 --- a/src/Entities.cpp +++ b/src/Entities.cpp @@ -66,7 +66,7 @@ void Bus::enterIntoViewOf(CNSocket *sock) { void Egg::enterIntoViewOf(CNSocket *sock) { INITSTRUCT(sP_FE2CL_SHINY_ENTER, pkt); - Eggs::npcDataToEggData(&appearanceData, &pkt.ShinyAppearanceData); + Eggs::npcDataToEggData(x, y, z, &appearanceData, &pkt.ShinyAppearanceData); sock->sendPacket(pkt, P_FE2CL_SHINY_ENTER); } diff --git a/tdata b/tdata index 0106669..f822f16 160000 --- a/tdata +++ b/tdata @@ -1 +1 @@ -Subproject commit 01066697e49b7c8c323347559d65ca75527d03e3 +Subproject commit f822f1640d8cf0e46539b75f561aeaeb1d68c9a9