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,8 +147,10 @@ void GroupManager::joinGroup(CNSocket* sock, CNPacketData* data) {
|
|||||||
// client doesnt read nano data here
|
// 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 (varPlr != plr) { // apply the new member's buffs to the group and the group's buffs to the new member
|
||||||
NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 1, 1, bitFlag);
|
if (NanoManager::SkillTable[varPlr->Nanos[varPlr->activeNano].iSkillID].targetType == 3)
|
||||||
NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 1, 1, bitFlag);
|
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,8 +343,10 @@ void GroupManager::groupKickPlayer(Player* plr) {
|
|||||||
moveDown = 1;
|
moveDown = 1;
|
||||||
otherPlr->groupIDs[i] = 0;
|
otherPlr->groupIDs[i] = 0;
|
||||||
} else { // remove the leaving member's buffs from the group and remove the group buffs from the leaving member.
|
} else { // remove the leaving member's buffs from the group and remove the group buffs from the leaving member.
|
||||||
NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 2, 1, 0);
|
if (NanoManager::SkillTable[varPlr->Nanos[varPlr->activeNano].iSkillID].targetType == 3)
|
||||||
NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 2, 1, bitFlag);
|
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,20 +721,18 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
|
|||||||
plr->HP = PC_MAXHEALTH(plr->level);
|
plr->HP = PC_MAXHEALTH(plr->level);
|
||||||
} else {
|
} else {
|
||||||
move = true;
|
move = true;
|
||||||
|
|
||||||
if (reviveData->iRegenType != 5)
|
if (reviveData->iRegenType != 5)
|
||||||
plr->HP = PC_MAXHEALTH(plr->level);
|
plr->HP = PC_MAXHEALTH(plr->level);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
int nanoID = plr->equippedNanos[i];
|
int nanoID = plr->equippedNanos[i];
|
||||||
|
// halve nano health if respawning
|
||||||
// halve nano health if respawning
|
if (reviveData->iRegenType == 6)
|
||||||
if (reviveData->iRegenType != 5)
|
plr->Nanos[nanoID].iStamina = 75; // max is 150, so 75 is half
|
||||||
plr->Nanos[nanoID].iStamina = 75; // max is 150, so 75 is half
|
response.PCRegenData.Nanos[i] = plr->Nanos[nanoID];
|
||||||
response.PCRegenData.Nanos[i] = plr->Nanos[nanoID];
|
if (plr->activeNano == nanoID)
|
||||||
if (plr->activeNano == nanoID)
|
activeSlot = i;
|
||||||
activeSlot = i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Response parameters
|
// Response parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user