|
|
|
|
@ -4586,6 +4586,23 @@ void RechargeItem(Item &item, Player &player)
|
|
|
|
|
} while (item._iCharges < item._iMaxCharges); |
|
|
|
|
|
|
|
|
|
item._iCharges = std::min(item._iCharges, item._iMaxCharges); |
|
|
|
|
|
|
|
|
|
if (&player != MyPlayer) |
|
|
|
|
return; |
|
|
|
|
if (&item == &player.InvBody[INVLOC_HAND_LEFT]) { |
|
|
|
|
NetSendCmdChItem(true, INVLOC_HAND_LEFT); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (&item == &player.InvBody[INVLOC_HAND_RIGHT]) { |
|
|
|
|
NetSendCmdChItem(true, INVLOC_HAND_RIGHT); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
for (size_t i = 0; i < player._pNumInv; i++) { |
|
|
|
|
if (&item == &player.InvList[i]) { |
|
|
|
|
NetSyncInvItem(player, i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool ApplyOilToItem(Item &item, Player &player) |
|
|
|
|
|