diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp index f32183b..17ec912 100644 --- a/src/GroupManager.cpp +++ b/src/GroupManager.cpp @@ -147,8 +147,10 @@ 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 - NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 1, 1, bitFlag); - NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 1, 1, bitFlag); + 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,8 +343,10 @@ 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. - NanoManager::applyBuff(sock, varPlr->Nanos[varPlr->activeNano].iSkillID, 2, 1, 0); - NanoManager::applyBuff(sockTo, plr->Nanos[plr->activeNano].iSkillID, 2, 1, bitFlag); + 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); } } diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index 8ed3d11..64547eb 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -721,20 +721,18 @@ 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) - 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; - } + for (int i = 0; i < 3; i++) { + int nanoID = plr->equippedNanos[i]; + // halve nano health if respawning + 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