diff --git a/server/gameserver/buff/bufffactory.cc b/server/gameserver/buff/bufffactory.cc new file mode 100644 index 00000000..3e512e8e --- /dev/null +++ b/server/gameserver/buff/bufffactory.cc @@ -0,0 +1,58 @@ +#include "precompile.h" + +#include "buff/bufffactory.h" + +#include "buff.h" + +#include "add_car.h" +#include "add_inventory.h" +#include "autoshot.h" +#include "batch_add.h" +#include "beatback.h" +#include "become.h" +#include "bepull.h" +#include "berecycle.h" +#include "bufffactory.h" +#include "callfunc.h" +#include "camouflage.h" +#include "camouflage_addition.h" +#include "cond_add.h" +#include "delay_add.h" +#include "disperse.h" +#include "dive.h" +#include "driver.h" +#include "flashmove.h" +#include "hide.h" +#include "hold_shield.h" +#include "immune.h" +#include "in_water.h" +#include "internal_add.h" +#include "jump.h" +#include "jumpto.h" +#include "machine_gun.h" +#include "once_chg_attr.h" +#include "passenger.h" +#include "pull.h" +#include "pull_to_walkable.h" +#include "remove_car.h" +#include "rescuer.h" +#include "reserve.h" +#include "reserve_move.h" +#include "select_target_with_self_pos.h" +#include "sprint.h" +#include "summon_hero.h" +#include "summon_obstacle.h" +#include "turnover.h" +#include "use_skill.h" + +#include "mt/Buff.h" + +Buff* BuffFactory::MakeBuff(const mt::Buff* buff_meta) +{ + switch (buff_meta->buff_effect()) { + case kBET_AddCarBuff: + return new AddCarBuff(); + default: + return new Buff(); + } +} diff --git a/server/gameserver/buff/bufffactory.h b/server/gameserver/buff/bufffactory.h new file mode 100644 index 00000000..5522af28 --- /dev/null +++ b/server/gameserver/buff/bufffactory.h @@ -0,0 +1,8 @@ +#pragma once + +class BuffFactory +{ + public: + + static Buff* MakeBuff(const mt::Buff* buff_meta); +};