1
This commit is contained in:
parent
fe8ac7eeac
commit
dc0d264c71
@ -15,7 +15,7 @@
|
||||
#include "buff/callfunc.h"
|
||||
#include "buff/camouflage.h"
|
||||
#include "buff/camouflage_addition.h"
|
||||
#include "buff/cond_add.h"
|
||||
#include "buff/event_add.h"
|
||||
#include "buff/delay_add.h"
|
||||
#include "buff/disperse.h"
|
||||
#include "buff/dive.h"
|
||||
@ -47,7 +47,7 @@
|
||||
#include "buff/modify_attr.h"
|
||||
#include "buff/vertigo.h"
|
||||
#include "buff/mark_tag.h"
|
||||
#include "buff/cond_tag.h"
|
||||
#include "buff/cond_add.h"
|
||||
|
||||
#include "mt/Buff.h"
|
||||
|
||||
@ -76,8 +76,8 @@ Buff* BuffFactory::MakeBuff(const mt::Buff* buff_meta)
|
||||
return new CamouflageBuff();
|
||||
case kBET_CamouflageAddition:
|
||||
return new CamouflageAdditionBuff();
|
||||
case kBET_CondAddBuff:
|
||||
return new CondAddBuff();
|
||||
case kBET_EventAdd:
|
||||
return new EventAddBuff();
|
||||
case kBET_DelayAddBuff:
|
||||
return new DelayAddBuff();
|
||||
case kBET_Disperse:
|
||||
@ -140,8 +140,8 @@ Buff* BuffFactory::MakeBuff(const mt::Buff* buff_meta)
|
||||
return new VertigoBuff();
|
||||
case kBET_MarkTag:
|
||||
return new MarkTagBuff();
|
||||
case kBET_CondTag:
|
||||
return new CondTagBuff();
|
||||
case kBET_CondAdd:
|
||||
return new CondAddBuff();
|
||||
default:
|
||||
return new Buff();
|
||||
}
|
||||
|
@ -8,10 +8,6 @@
|
||||
|
||||
void CondAddBuff::Activate()
|
||||
{
|
||||
if (!IsValidCondBuff(meta->_int_buff_param1)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
list_add_tail(&cond_entry, &owner->cond_buffs_[meta->_int_buff_param1]);
|
||||
}
|
||||
|
||||
void CondAddBuff::Deactivate()
|
||||
|
@ -1,16 +0,0 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "buff/cond_tag.h"
|
||||
|
||||
#include "creature.h"
|
||||
|
||||
#include "mt/Buff.h"
|
||||
|
||||
void CondTagBuff::Activate()
|
||||
{
|
||||
}
|
||||
|
||||
void CondTagBuff::Deactivate()
|
||||
{
|
||||
|
||||
}
|
20
server/gameserver/buff/event_add.cc
Normal file
20
server/gameserver/buff/event_add.cc
Normal file
@ -0,0 +1,20 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "buff/event_add.h"
|
||||
|
||||
#include "creature.h"
|
||||
|
||||
#include "mt/Buff.h"
|
||||
|
||||
void EventAddBuff::Activate()
|
||||
{
|
||||
if (!IsValidCondBuff(meta->_int_buff_param1)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
list_add_tail(&cond_entry, &owner->cond_buffs_[meta->_int_buff_param1]);
|
||||
}
|
||||
|
||||
void EventAddBuff::Deactivate()
|
||||
{
|
||||
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "buff.h"
|
||||
|
||||
class CondTagBuff : public Buff
|
||||
class EventAddBuff : public Buff
|
||||
{
|
||||
public:
|
||||
|
@ -72,7 +72,7 @@ A8_DECLARE_ENUM(BuffEffectType_e,
|
||||
kBET_Become = 38, //变身
|
||||
kBET_ShotCharge = 39, //射击蓄力
|
||||
kBET_SelectTargetWithSelfPos = 40, //已自己坐标为中心范围内选取目标,并且批量添加buff
|
||||
kBET_CondAddBuff = 41, //条件添加buff
|
||||
kBET_EventAdd = 41, //even添加buff
|
||||
kBET_AddInventory = 42, //扩充库存
|
||||
kBET_Down = 43, //倒下
|
||||
kBET_Poisoning = 44, //中毒(毒圈中)
|
||||
@ -103,7 +103,7 @@ A8_DECLARE_ENUM(BuffEffectType_e,
|
||||
kBET_Disperse = 68, //驱散
|
||||
kBET_PeaceMode = 69, //和平模式
|
||||
kBET_MarkTag = 70, //
|
||||
kBET_CondTag = 71, //
|
||||
kBET_CondAdd = 71, //
|
||||
kBET_Dive = 72, //下潜模式
|
||||
kBET_Reverse = 73, //人物反向
|
||||
kBET_ReverseMove = 74, //人物反向移动
|
||||
|
@ -171,7 +171,7 @@ int Creature::AddBuff(Creature* caster,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (buff_meta->buff_effect() == kBET_CondTag) {
|
||||
if (buff_meta->buff_effect() == kBET_CondAdd) {
|
||||
switch (buff_meta->_int_buff_param1) {
|
||||
case 1:
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ private:
|
||||
friend class BePullBuff;
|
||||
friend class CamouflageBuff;
|
||||
friend class CamouflageAdditionBuff;
|
||||
friend class CondAddBuff;
|
||||
friend class EventAddBuff;
|
||||
friend class FlashMoveBuff;
|
||||
friend class JumpBuff;
|
||||
friend class JumpToBuff;
|
||||
|
@ -210,7 +210,7 @@ namespace mt
|
||||
}
|
||||
}
|
||||
}
|
||||
if (buff_effect() == kBET_CondAddBuff) {
|
||||
if (buff_effect() == kBET_EventAdd) {
|
||||
if (!IsValidCondBuff(_int_buff_param1)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void SelfChecker::Init()
|
||||
}
|
||||
}
|
||||
break;
|
||||
case kBET_CondAddBuff:
|
||||
case kBET_EventAdd:
|
||||
{
|
||||
for (int buff_id : meta->_buff_param4_int_list) {
|
||||
SelfChecker::AddBuff(buff_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user