Move mob active skills to new system

This commit is contained in:
gsemaj 2023-08-14 19:28:45 -07:00
parent a3008cab3c
commit 57f8f3e0e1
No known key found for this signature in database
GPG Key ID: 24B96BAA40497929

View File

@ -326,12 +326,6 @@ static void dealCorruption(Mob *mob, std::vector<int> targetData, int skillID, i
} }
static void useAbilities(Mob *mob, time_t currTime) { static void useAbilities(Mob *mob, time_t currTime) {
/*
* targetData approach
* first integer is the count
* second to fifth integers are IDs, these can be either player iID or mob's iID
* whether the skill targets players or mobs is determined by the skill packet being fired
*/
Player *plr = PlayerManager::getPlayer(mob->target); Player *plr = PlayerManager::getPlayer(mob->target);
if (mob->skillStyle >= 0) { // corruption hit if (mob->skillStyle >= 0) { // corruption hit
@ -389,14 +383,11 @@ static void useAbilities(Mob *mob, time_t currTime) {
if (random < prob1) { // active skill hit if (random < prob1) { // active skill hit
int skillID = (int)mob->data["m_iActiveSkill1"]; int skillID = (int)mob->data["m_iActiveSkill1"];
// TODO ABILITIES SkillData* skill = &Abilities::SkillTable[skillID];
//std::vector<int> targetData = {1, plr->iID, 0, 0, 0}; int debuffID = Abilities::getCSTBFromST(skill->skillType);
//for (auto& pwr : Abilities::Powers) if(plr->hasBuff(debuffID))
// if (pwr.skillType == Abilities::SkillTable[skillID].skillType) { return; // prevent debuffing a player twice
// if (pwr.bitFlag != 0 && (plr->iConditionBitFlag & pwr.bitFlag)) Abilities::useNPCSkill(mob->getRef(), skillID, { plr });
// return; // prevent debuffing a player twice
// pwr.handle(mob->id, targetData, skillID, Abilities::SkillTable[skillID].durationTime[0], Abilities::SkillTable[skillID].powerIntensity[0]);
// }
mob->nextAttack = currTime + (int)mob->data["m_iDelayTime"] * 100; mob->nextAttack = currTime + (int)mob->data["m_iDelayTime"] * 100;
return; return;
} }