mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-12 17:50:06 +00:00
Add battery caps for combat rewards & commands
This commit is contained in:
parent
83c378c9c2
commit
26460c0167
@ -191,6 +191,11 @@ void MobManager::giveReward(CNSocket *sock, Mob* mob) {
|
||||
if (rand() % 3 == 0)
|
||||
plr->batteryW += drop.boosts;
|
||||
}
|
||||
// caps
|
||||
if (plr->batteryW > 9999)
|
||||
plr->batteryW = 9999;
|
||||
if (plr->batteryN > 9999)
|
||||
plr->batteryN = 9999;
|
||||
|
||||
// simple rewards
|
||||
reward->m_iCandy = plr->money;
|
||||
@ -1154,4 +1159,4 @@ void MobManager::clearDebuff(Mob *mob) {
|
||||
pkt1.iID = mob->appearanceData.iNPC_ID;
|
||||
pkt1.iConditionBitFlag = mob->appearanceData.iConditionBitFlag;
|
||||
NPCManager::sendToViewable(mob, &pkt1, P_FE2CL_CHAR_TIME_BUFF_TIME_OUT, sizeof(sP_FE2CL_CHAR_TIME_BUFF_TIME_OUT));
|
||||
}
|
||||
}
|
||||
|
@ -746,9 +746,15 @@ void PlayerManager::setSpecialPlayer(CNSocket* sock, CNPacketData* data) {
|
||||
break;
|
||||
case 2:
|
||||
plr->batteryW = setData->iSetValue;
|
||||
// caps
|
||||
if (plr->batteryW > 9999)
|
||||
plr->batteryW = 9999;
|
||||
break;
|
||||
case 3:
|
||||
plr->batteryN = setData->iSetValue;
|
||||
// caps
|
||||
if (plr->batteryN > 9999)
|
||||
plr->batteryN = 9999;
|
||||
break;
|
||||
case 4:
|
||||
plr->fusionmatter = setData->iSetValue;
|
||||
|
Loading…
Reference in New Issue
Block a user