Compare commits

..

1 Commits

Author SHA1 Message Date
FinnHornhoover
551d4ebb8b
Merge 613a4c58a3 into c636c538eb 2023-09-02 20:50:38 -07:00

View File

@ -69,10 +69,10 @@ static void setValuePlayer(CNSocket* sock, CNPacketData* data) {
// Handle serverside value-changes // Handle serverside value-changes
switch (setData->iSetValueType) { switch (setData->iSetValueType) {
case CN_GM_SET_VALUE_TYPE__HP: case 1:
response.iSetValue = plr->HP = setData->iSetValue; response.iSetValue = plr->HP = setData->iSetValue;
break; break;
case CN_GM_SET_VALUE_TYPE__WEAPON_BATTERY : case 2:
plr->batteryW = setData->iSetValue; plr->batteryW = setData->iSetValue;
// caps // caps
@ -81,7 +81,7 @@ static void setValuePlayer(CNSocket* sock, CNPacketData* data) {
response.iSetValue = plr->batteryW; response.iSetValue = plr->batteryW;
break; break;
case CN_GM_SET_VALUE_TYPE__NANO_BATTERY: case 3:
plr->batteryN = setData->iSetValue; plr->batteryN = setData->iSetValue;
// caps // caps
@ -90,17 +90,13 @@ static void setValuePlayer(CNSocket* sock, CNPacketData* data) {
response.iSetValue = plr->batteryN; response.iSetValue = plr->batteryN;
break; break;
case CN_GM_SET_VALUE_TYPE__FUSION_MATTER: case 4:
Missions::updateFusionMatter(sock, setData->iSetValue - plr->fusionmatter); Missions::updateFusionMatter(sock, setData->iSetValue - plr->fusionmatter);
response.iSetValue = plr->fusionmatter; response.iSetValue = plr->fusionmatter;
break; break;
case CN_GM_SET_VALUE_TYPE__CANDY: case 5:
response.iSetValue = plr->money = setData->iSetValue; response.iSetValue = plr->money = setData->iSetValue;
break; break;
case CN_GM_SET_VALUE_TYPE__SPEED:
case CN_GM_SET_VALUE_TYPE__JUMP:
response.iSetValue = setData->iSetValue;
break;
} }
response.iPC_ID = setData->iPC_ID; response.iPC_ID = setData->iPC_ID;