mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-24 22:11:04 +00:00
Move mob active skills to new system
This commit is contained in:
parent
a3008cab3c
commit
57f8f3e0e1
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user