From fa71ea33d97c6e1665edcf5ffa4470dcfacd6524 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 19 Oct 2022 11:28:03 +0800 Subject: [PATCH] 1 --- server/gameserver/constant.h | 4 ++-- server/gameserver/creature.cc | 11 +++++++++++ server/gameserver/human.cc | 2 +- server/gameserver/human.h | 1 + server/gameserver/player.cc | 2 +- server/tools/protobuild/cs_proto.proto | 5 +++-- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index 63c0ddc8..0c562bce 100644 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -104,7 +104,7 @@ enum InventorySlot_e IS_TRAP = 19, //陷井 IS_POSION_GAS_BOMB = 20, //毒气弹 - IS_C4 = 21, //c3 + IS_C4 = 21, //c4 IS_SHIELD_WALL = 22, //盾墙 IS_SINGAL_GUN = 23, //信号枪 IS_OIL_BUCKET = 24, //汽油桶 @@ -527,7 +527,7 @@ const int SPEC3_IS_BEGIN = IS_C4; const int SPEC3_IS_END = IS_OIL_BUCKET; const int SPEC1_SLOT_BEGIN = 3; //手雷 烟雾弹 -const int SPEC2_SLOT_BEGIN = 5; //毒气弹 燃烧瓶 陷井 地雷 +const int SPEC2_SLOT_BEGIN = 5; //地雷 燃烧瓶 陷井 毒气弹 const int SPEC3_SLOT_BEGIN = 9; //c4 盾墙 信号抢 汽油桶 const int DOOR_THING_ID = 61701; diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 2d8173ff..255140b5 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -2733,6 +2733,17 @@ void Creature::ProcOnceChgAttrBuff(MetaData::Buff* buff_meta) DecHP(std::abs(chg_hp), VP_Buff, "", buff_meta->i->buff_id()); } } +#ifdef DEBUG + { + std::string dbg_msg = a8::Format + ("buff扣血 type:%s val:%f", + { + buff_meta->int_param2, + buff_meta->int_param3, + }); + room->BroadcastDebugMsg(dbg_msg); + } +#endif SyncAroundPlayers(__FILE__, __LINE__, __func__); } break; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 62648384..084e7f27 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1319,7 +1319,7 @@ void Human::AddToPartObjects(Entity* entity) void Human::RemovePartObjects(Entity* entity) { - #ifdef DEBUG + #ifdef DEBUG1 if (!follow_target_) { for (Human* observer : observers_) { if (observer->IsPlayer()) { diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 4bc41628..046386b8 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -44,6 +44,7 @@ struct OverRewardItem int id = 0; std::string obtain_gold; std::string gold_limit; + std::string curr_gold; }; struct OverReward diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 7a6e97a2..591ffe9d 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -88,7 +88,7 @@ void Player::Initialize() } #ifdef DEBUG { - std::vector present_items{30202, 30201, 30301, 30203, 30207, 30208, 30209, 30210, 30204}; + std::vector present_items{30202, 30201, 30301, 30203, 30207, 30208, 30209, 30210, 30204, 30205, 30206}; for (int item_id : present_items) { GMAddItem(item_id, 10); } diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 89549c99..1879e6e2 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -501,10 +501,10 @@ message MFActivePlayerData 2:枪2 3:手雷 4:烟雾弹 - 5: 毒气弹 + 5: 地雷 6: 燃烧瓶 7: 陷阱 - 8: 地雷 + 8: 毒气弹 9: c4 10: 盾墙 11: 信号抢 @@ -869,6 +869,7 @@ message MFOverRewardItem optional string obtain_gold = 1 [default = "0"]; //实际获得金币数 optional string gold_limit = 2 [default = "0"]; //今天可获得的金币上限 optional int32 id = 3; //英雄或者武器id + optional string curr_gold = 4 [default = "0"]; //当前金币数 } //结算奖励