mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 21:20:04 +00:00
Respawn players at half health
Cleaned up the adjacent code slightly; might clean it up further later.
This commit is contained in:
parent
ed285e5d24
commit
e2c85aa03f
@ -385,14 +385,18 @@ static void revivePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
if (reviveData->iRegenType == 3 && plr->iConditionBitFlag & CSB_BIT_PHOENIX) {
|
||||
// nano revive
|
||||
plr->Nanos[plr->activeNano].iStamina = 0;
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
plr->HP = PC_MAXHEALTH(plr->level) / 2;
|
||||
Nanos::applyBuff(sock, plr->Nanos[plr->activeNano].iSkillID, 2, 1, 0);
|
||||
} else if (reviveData->iRegenType == 4) {
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
} else {
|
||||
// revived by group member's nano
|
||||
plr->HP = PC_MAXHEALTH(plr->level) / 2;
|
||||
} else if (reviveData->iRegenType == 5) {
|
||||
// warp away
|
||||
move = true;
|
||||
if (reviveData->iRegenType != 5)
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
} else {
|
||||
// plain respawn
|
||||
move = true;
|
||||
plr->HP = PC_MAXHEALTH(plr->level) / 2;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user