Fix boosts and potions not updating on reward

This commit is contained in:
Gent Semaj 2020-09-27 02:58:33 -04:00
parent f8f2088e38
commit dd374b2ea1

View File

@ -69,6 +69,7 @@ void MobManager::pcAttackNpcs(CNSocket *sock, CNPacketData *data) {
respdata[i].iHitFlag = 2; // hitscan, not a rocket or a grenade respdata[i].iHitFlag = 2; // hitscan, not a rocket or a grenade
} }
resp->iBatteryW = plr->batteryW;
sock->sendPacket((void*)respbuf, P_FE2CL_PC_ATTACK_NPCs_SUCC, resplen); sock->sendPacket((void*)respbuf, P_FE2CL_PC_ATTACK_NPCs_SUCC, resplen);
// a bit of a hack: these are the same size, so we can reuse the response packet // a bit of a hack: these are the same size, so we can reuse the response packet
@ -133,6 +134,8 @@ void MobManager::giveReward(CNSocket *sock) {
// simple rewards // simple rewards
reward->m_iCandy = plr->money; reward->m_iCandy = plr->money;
reward->m_iFusionMatter = plr->fusionmatter; reward->m_iFusionMatter = plr->fusionmatter;
reward->m_iBatteryN = plr->batteryN;
reward->m_iBatteryW = plr->batteryW;
reward->iFatigue = 100; // prevents warning message reward->iFatigue = 100; // prevents warning message
reward->iFatigue_Level = 1; reward->iFatigue_Level = 1;
reward->iItemCnt = 1; // remember to update resplen if you change this reward->iItemCnt = 1; // remember to update resplen if you change this