From 1b3b31875b77a22dbcf07f5076c63de431f89a3f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 4 Mar 2023 19:20:41 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.cc | 74 ++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 609007b2..d817cbe7 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -172,44 +172,48 @@ int Creature::AddBuff(Creature* caster, } } if (buff_meta->buff_effect() == kBET_CondAdd) { - switch (buff_meta->_int_buff_param1) { - case 1: - { - if (!(GetBuffTag(buff_meta->_int_buff_param2) > - buff_meta->_int_buff_param3)) { + if (buff_meta->_int_buff_param1 == 1) { + switch (buff_meta->_int_buff_param2) { + case 1: + { + if (!(GetBuffTag(buff_meta->_int_buff_param3) > + buff_meta->_int_buff_param4)) { + return 0; + } + } + break; + case 2: + { + if (!(GetBuffTag(buff_meta->_int_buff_param3) < + buff_meta->_int_buff_param4)) { + return 0; + } + } + break; + case 3: + { + if (!(GetBuffTag(buff_meta->_int_buff_param3) == + buff_meta->_int_buff_param4)) { + return 0; + } + } + break; + case 4: + { + if (!(GetBuffTag(buff_meta->_int_buff_param3) != + buff_meta->_int_buff_param4)) { + return 0; + } + } + break; + default: + { return 0; } + break; } - break; - case 2: - { - if (!(GetBuffTag(buff_meta->_int_buff_param2) < - buff_meta->_int_buff_param3)) { - return 0; - } - } - break; - case 3: - { - if (!(GetBuffTag(buff_meta->_int_buff_param2) == - buff_meta->_int_buff_param3)) { - return 0; - } - } - break; - case 4: - { - if (!(GetBuffTag(buff_meta->_int_buff_param2) != - buff_meta->_int_buff_param3)) { - return 0; - } - } - break; - default: - { - return 0; - } - break; + } else if (buff_meta->_int_buff_param1 == 2){ + } } if (buff_meta->no_immune()) {