diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 0dfac3d..dbfe0c4 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -2984,6 +2984,15 @@ void Human::DropItems(Obstacle* obstacle) } else { ++normal_drop_times_; } + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("DropItems normal:%d box:%d drop_id:%d is_treasure_box:%d", + { + normal_drop_times_, + box_drop_times_, + drop_id, + is_treasure_box ? 1 : 0 + }); + #endif } void Human::RecalcBuffAttr() @@ -3219,6 +3228,16 @@ void Human::AdjustDecHp(float old_health, float& new_health) if (buff) { if (GetHP() < GetMaxHP() * buff->meta->param1) { new_health = std::max(GetMaxHP() * buff->meta->param1, GetMaxHP()); +#ifdef DEBUG + a8::UdpLog::Instance()->Debug("触发新手保护buff %d %s %s %f %f", + { + room->room_idx, + account_id, + name, + old_health, + new_health + }); +#endif } } } diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 8ace7a9..41ad690 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -201,6 +201,14 @@ void Room::AddPlayer(Player* hum) if (buff_meta) { hum->AddBuff(buff_meta, 1); } +#ifdef DEBUG + a8::UdpLog::Instance()->Debug("添加新手buff %s %s %d", + { + hum->account_id, + hum->name, + buff_id + }); +#endif } } while (human_hash_.size() > ROOM_MAX_PLAYER_NUM) { @@ -1730,6 +1738,13 @@ void Room::DisableHuman(Human* target) void Room::ShuaNewBieAndroid(Human* target) { + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("ShuaNewBieAndroid %s %s", + { + target->account_id, + target->name + }); +#endif for (auto& pair : human_hash_) { if (pair.second->entity_subtype == EST_Android && a8::HasBitFlag(pair.second->status, HS_Disable)) { @@ -1848,6 +1863,13 @@ void Room::DieAndroidTimerFunc() void Room::ProcShuaAndroid(int shua_time, int shua_num) { + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("ProcShuaAndroid shua_time:%d shua_num%d", + { + shua_time, + shua_num + }); + #endif for (auto& pair : human_hash_) { if (pair.second->entity_subtype == EST_Android && a8::HasBitFlag(pair.second->status, HS_Disable)) { @@ -1858,6 +1880,13 @@ void Room::ProcShuaAndroid(int shua_time, int shua_num) void Room::ProcDieAndroid(int die_time, int die_num) { + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("ProcDieAndroid die_time:%d die_num:%d", + { + die_time, + die_num + }); + #endif for (auto& pair : human_hash_) { if (pair.second->entity_subtype == EST_Android && a8::HasBitFlag(pair.second->status, HS_Disable)) { diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 916e865..9fabf37 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -91,6 +91,7 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg) hdr.socket_handle, msg); hum->meta = MetaMgr::Instance()->human_meta; + hum->room = room; hum->ProcPrepareItems(msg.prepare_items()); hum->ProcPrepareItems2(msg.prepare_items2()); room->AddPlayer(hum); diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index 28754ee..146ce9a 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -57,9 +57,27 @@ void RoomObstacle::RecalcSelfCollider() break; } } + if (!self_collider_) { + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("OnAddCollider %d %d %d", + { + room->room_idx, + entity_uniid, + (long long)self_collider_ + }); + #endif + } } void RoomObstacle::OnRemoveCollider(ColliderComponent* collider) { + #ifdef DEBUG + a8::UdpLog::Instance()->Debug("OnRemoveCollider %d %d %d", + { + room->room_idx, + entity_uniid, + (long long)collider + }); + #endif room->map_service->RemoveCollider(collider); } diff --git a/third_party/a8engine b/third_party/a8engine index 837e2d9..8303f98 160000 --- a/third_party/a8engine +++ b/third_party/a8engine @@ -1 +1 @@ -Subproject commit 837e2d9f9e700a58f3536f97206c2abf39cd4303 +Subproject commit 8303f98fe3cd6fa6ed60263676fa6b4a3beddeac