Compare commits

...

8 Commits

Author SHA1 Message Date
aozhiwei
48f6aaa216 1 2021-01-20 19:32:29 +08:00
aozhiwei
55aea64c8c 1 2021-01-20 19:17:23 +08:00
aozhiwei
93afef4361 1 2021-01-20 18:25:26 +08:00
aozhiwei
57cd7d74d9 1 2020-11-11 20:03:19 +08:00
aozhiwei
02d5677b08 1 2020-11-11 16:24:27 +08:00
aozhiwei
a7df7c2165 1 2020-11-09 18:47:53 +08:00
aozhiwei
fb12c701bd 1 2020-11-09 16:54:48 +08:00
aozhiwei
5c3bd6b74a 1 2020-11-09 15:53:47 +08:00
3 changed files with 19 additions and 6 deletions

View File

@ -1,7 +1,7 @@
project(gameserver)
project(gameserver2004)
cmake_minimum_required(VERSION 2.8)
set(GAME_ID 2004)
set(GAME_ID 2001)
if (${RELEASE})
set(CMAKE_BUILD_TYPE "Release")
@ -71,7 +71,7 @@ set(EXECUTABLE_OUTPUT_PATH
)
add_executable(
gameserver${GAME_ID} ${SRC_LIST}
gameserver2004 ${SRC_LIST}
)
add_custom_target(script_pb_protocol ALL)
@ -79,11 +79,11 @@ add_custom_command(TARGET script_pb_protocol
PRE_BUILD
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=cs_proto,cs_msgid,ss_proto,ss_msgid,metatable --python_out=../tools/robot/virtualclient
)
add_dependencies(gameserver${GAME_ID} script_pb_protocol)
add_dependencies(gameserver2004 script_pb_protocol)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(
gameserver${GAME_ID}
gameserver2004
pthread
mysqlclient
protobuf
@ -101,7 +101,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
)
else()
target_link_libraries(
gameserver${GAME_ID}
gameserver2004
pthread
mysqlclient
protobuf

View File

@ -2555,6 +2555,12 @@ void Human::SendBattleReport()
url = "http://game2004api.kingsome.cn/webapp/index.php?c=Role&a=battleReport";
}
}
if (GAME_ID == 2001) {
url = "https://game2001api-test.kingsome.cn/5991/webapp/index.php?c=Role&a=battleReport";
if (f8::IsOnlineEnv()) {
url = "https://game2001api-banshu.kingsome.cn/5991/webapp/index.php?c=Role&a=battleReport";
}
}
std::string data;
params->ToUrlEncodeStr(data);
f8::HttpClientPool::Instance()->HttpGet(

View File

@ -457,6 +457,11 @@ int Room::CreateLoot(int equip_id, a8::Vec2 pos, int count, int equip_lv)
{
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(equip_id);
if (equip_meta) {
#if 1
if (equip_meta->i->equip_type() == EQUIP_TYPE_SKIN) {
return 0;
}
#endif
Loot* entity = EntityFactory::Instance()->MakeLoot(AllocUniid());
entity->room = this;
entity->meta = equip_meta;
@ -3282,6 +3287,7 @@ void Room::NotifySysPiao(const std::string& msg, int color, int duration)
void Room::OnZombieAppear(Human* hum)
{
#if 0
if (hum->GetRace() == kZombieRace && hum->meta->i->level() == 3 && !sent_zombie_boss_notify) {
sent_zombie_boss_notify = true;
TouchPlayerList
@ -3296,6 +3302,7 @@ void Room::OnZombieAppear(Human* hum)
}
);
}
#endif
}
int Room::GetAliveCountByRace(RaceType_e race)