1
This commit is contained in:
parent
e102d4a5ac
commit
3ee4fb2175
@ -491,8 +491,3 @@ void Buff::ProcPullToWalkable()
|
||||
owner->FindLocation();
|
||||
}
|
||||
}
|
||||
|
||||
void Buff::ProcCondAddBuff()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ class Buff
|
||||
void ProcSeletTargetWithSelfPos();
|
||||
void ProcTurnOver();
|
||||
void ProcPullToWalkable();
|
||||
void ProcCondAddBuff();
|
||||
|
||||
private:
|
||||
void InternalTimerAddBuff();
|
||||
|
@ -288,6 +288,9 @@ void Creature::RemoveBuffById(int buff_id)
|
||||
if (!list_empty(&buff.depend_entry)) {
|
||||
list_del_init(&buff.depend_entry);
|
||||
}
|
||||
if (!list_empty(&buff.cond_entry)) {
|
||||
list_del_init(&buff.cond_entry);
|
||||
}
|
||||
removed_buffs.push_back(std::make_tuple(buff.meta, buff.GetCaster().Get()));
|
||||
OnBuffRemove(buff);
|
||||
buff_list_.erase(itr);
|
||||
@ -1001,7 +1004,10 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
||||
break;
|
||||
case kBET_CondAddBuff:
|
||||
{
|
||||
buff->ProcCondAddBuff();
|
||||
if (!IsValidCondBuff(buff->meta->int_param1)) {
|
||||
abort();
|
||||
}
|
||||
list_add_tail(&buff->cond_entry, &cond_buffs_[buff->meta->int_param1]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -46,3 +46,8 @@ bool IsValidHumanAttr(int attr_type)
|
||||
{
|
||||
return attr_type > kHAT_Begin && attr_type < kHAT_End;
|
||||
}
|
||||
|
||||
bool IsValidCondBuff(int cond)
|
||||
{
|
||||
return cond >= 0 && cond < kCondBuffEnd;
|
||||
}
|
||||
|
@ -24,3 +24,4 @@ class Global : public a8::Singleton<Global>
|
||||
bool IsValidSlotId(int slot_id);
|
||||
bool IsValidBuffEffect(int buff_effect);
|
||||
bool IsValidHumanAttr(int attr_type);
|
||||
bool IsValidCondBuff(int cond);
|
||||
|
@ -888,6 +888,11 @@ namespace MetaData
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i->buff_effect() == kBET_CondAddBuff) {
|
||||
if (!IsValidCondBuff(int_param1)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Buff::EffectCanStack()
|
||||
|
Loading…
x
Reference in New Issue
Block a user