mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
Non-group buffs do not misbehave + Revive nano stamina fix
This commit is contained in:
parent
7cc0a0fc82
commit
d2e89851d6
@ -147,7 +147,9 @@ void GroupManager::joinGroup(CNSocket* sock, CNPacketData* data) {
|
||||
// client doesnt read nano data here
|
||||
|
||||
if (varPlr != plr) { // apply the new member's buffs to the group and the group's buffs to the new member
|
||||
if (NanoManager::SkillTable[varPlr->Nanos[varPlr->activeNano].iSkillID].targetType == 3)
|
||||
NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 1, 1, bitFlag);
|
||||
if (NanoManager::SkillTable[plr->Nanos[plr->activeNano].iSkillID].targetType == 3)
|
||||
NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 1, 1, bitFlag);
|
||||
}
|
||||
}
|
||||
@ -341,7 +343,9 @@ void GroupManager::groupKickPlayer(Player* plr) {
|
||||
moveDown = 1;
|
||||
otherPlr->groupIDs[i] = 0;
|
||||
} else { // remove the leaving member's buffs from the group and remove the group buffs from the leaving member.
|
||||
if (NanoManager::SkillTable[varPlr->Nanos[varPlr->activeNano].iSkillID].targetType == 3)
|
||||
NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 2, 1, 0);
|
||||
if (NanoManager::SkillTable[plr->Nanos[varPlr->activeNano].iSkillID].targetType == 3)
|
||||
NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 2, 1, bitFlag);
|
||||
}
|
||||
}
|
||||
|
@ -721,21 +721,19 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
} else {
|
||||
move = true;
|
||||
|
||||
if (reviveData->iRegenType != 5)
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
int nanoID = plr->equippedNanos[i];
|
||||
|
||||
// halve nano health if respawning
|
||||
if (reviveData->iRegenType != 5)
|
||||
if (reviveData->iRegenType == 6)
|
||||
plr->Nanos[nanoID].iStamina = 75; // max is 150, so 75 is half
|
||||
response.PCRegenData.Nanos[i] = plr->Nanos[nanoID];
|
||||
if (plr->activeNano == nanoID)
|
||||
activeSlot = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Response parameters
|
||||
response.PCRegenData.iActiveNanoSlotNum = activeSlot;
|
||||
|
Loading…
Reference in New Issue
Block a user