mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Remove redundant initialization in nanoSummonHandler().
This commit is contained in:
parent
51a8cc8bdf
commit
756074cc62
@ -93,14 +93,13 @@ void NanoManager::nanoSummonHandler(CNSocket* sock, CNPacketData* data) {
|
|||||||
sNano nano = plr.plr.Nanos[nanoId];
|
sNano nano = plr.plr.Nanos[nanoId];
|
||||||
|
|
||||||
// Send to other players
|
// Send to other players
|
||||||
for (CNSocket *s : PlayerManager::players[sock].viewable) {
|
INITSTRUCT(sP_FE2CL_NANO_ACTIVE, pkt1);
|
||||||
INITSTRUCT(sP_FE2CL_NANO_ACTIVE, pkt);
|
|
||||||
|
|
||||||
pkt.iPC_ID = plr.plr.iID;
|
pkt1.iPC_ID = plr.plr.iID;
|
||||||
pkt.Nano = nano;
|
pkt1.Nano = nano;
|
||||||
|
|
||||||
s->sendPacket((void*)&pkt, P_FE2CL_NANO_ACTIVE, sizeof(sP_FE2CL_NANO_ACTIVE));
|
for (CNSocket *s : PlayerManager::players[sock].viewable)
|
||||||
}
|
s->sendPacket((void*)&pkt1, P_FE2CL_NANO_ACTIVE, sizeof(sP_FE2CL_NANO_ACTIVE));
|
||||||
|
|
||||||
// update player
|
// update player
|
||||||
plr.plr.nano = nanoId;
|
plr.plr.nano = nanoId;
|
||||||
@ -184,8 +183,8 @@ void NanoManager::setNanoSkill(CNSocket* sock, int16_t nanoId, int16_t skillId)
|
|||||||
std::cout << U16toU8(plr.PCStyle.szFirstName) << U16toU8(plr.PCStyle.szLastName) << " set skill id " << skillId << " for nano: " << nanoId << std::endl;
|
std::cout << U16toU8(plr.PCStyle.szFirstName) << U16toU8(plr.PCStyle.szLastName) << " set skill id " << skillId << " for nano: " << nanoId << std::endl;
|
||||||
)
|
)
|
||||||
|
|
||||||
// Update the player
|
// Update the player
|
||||||
PlayerManager::updatePlayer(sock, plr);
|
PlayerManager::updatePlayer(sock, plr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NanoManager::resetNanoSkill(CNSocket* sock, int16_t nanoId) {
|
void NanoManager::resetNanoSkill(CNSocket* sock, int16_t nanoId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user