[refactor] Refactor groups

This commit is contained in:
gsemaj
2022-04-22 21:13:00 -04:00
committed by gsemaj
parent 4b834579c5
commit 03d28bf4e4
11 changed files with 182 additions and 160 deletions

View File

@@ -16,10 +16,9 @@ std::unordered_map<int, EggType> Eggs::EggTypes;
int Eggs::eggBuffPlayer(CNSocket* sock, int skillId, int eggId, int duration) {
Player* plr = PlayerManager::getPlayer(sock);
Player* otherPlr = PlayerManager::getPlayerFromID(plr->iIDGroup);
int bitFlag = Groups::getGroupFlags(otherPlr);
// TODO ABILITIES
int bitFlag = plr->group->conditionBitFlag;
int CBFlag = 0;// Abilities::applyBuff(sock, skillId, 1, 3, bitFlag);
size_t resplen;
@@ -98,9 +97,8 @@ static void eggStep(CNServer* serv, time_t currTime) {
CNSocket* sock = it->first.first;
int32_t CBFlag = it->first.second;
Player* plr = PlayerManager::getPlayer(sock);
Player* otherPlr = PlayerManager::getPlayerFromID(plr->iIDGroup);
int groupFlags = Groups::getGroupFlags(otherPlr);
int groupFlags = plr->group->conditionBitFlag;
// TODO ABILITIES
//for (auto& pwr : Abilities::Powers) {
// if (pwr.bitFlag == CBFlag) { // pick the power with the right flag and unbuff