头条不掉落时装

This commit is contained in:
aozhiwei 2020-08-20 13:22:10 +08:00
parent 2fab34b404
commit 4546e3ec20
4 changed files with 20 additions and 3 deletions

View File

@ -324,7 +324,8 @@ enum ColliderTag_e
enum GameChannel_e enum GameChannel_e
{ {
kWxChannelId = 6001 kWxChannelId = 6001,
kTouTiaoChannelId = 6006
}; };
const char* const PROJ_NAME_FMT = "game%d_gameserver"; const char* const PROJ_NAME_FMT = "game%d_gameserver";

View File

@ -2436,6 +2436,20 @@ void Human::GenZbModeBattleReportData(a8::MutableXObject* params)
void Human::DeadDrop() void Human::DeadDrop()
{ {
auto SkinCanDrop =
[this] (Skin* skin) -> bool
{
#ifdef DEBUG
return false;
#else
if (JsonDataMgr::Instance()->channel == kTouTiaoChannelId) {
return false;
} else {
return skin->skin_id != 0;
}
#endif
};
if (GetRace() == kHumanRace && !HasBuffEffect(kBET_Terminator)) { if (GetRace() == kHumanRace && !HasBuffEffect(kBET_Terminator)) {
for (auto& weapon : weapons) { for (auto& weapon : weapons) {
if (weapon.weapon_id != 0 && weapon.weapon_id != default_weapon.weapon_id) { if (weapon.weapon_id != 0 && weapon.weapon_id != default_weapon.weapon_id) {
@ -2449,7 +2463,7 @@ void Human::DeadDrop()
} }
{ {
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT); Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
if (old_skin && old_skin->skin_id != 0) { if (old_skin && old_skin->skin_id != 0 && SkinCanDrop(old_skin)) {
a8::Vec2 dir = a8::Vec2::UP; a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle()); dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1); room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
@ -2458,7 +2472,7 @@ void Human::DeadDrop()
} }
{ {
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH); Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
if (old_skin && old_skin->skin_id != 0) { if (old_skin && old_skin->skin_id != 0 && SkinCanDrop(old_skin)) {
a8::Vec2 dir = a8::Vec2::UP; a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle()); dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1); room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);

View File

@ -44,6 +44,7 @@ class Human : public MoveableEntity
bool auto_fill = false; bool auto_fill = false;
int today_enter_times = 0; int today_enter_times = 0;
int account_registertime = 0; int account_registertime = 0;
int channel = 0;
MetaData::Player* meta = nullptr; MetaData::Player* meta = nullptr;
MetaData::Equip* helmet_meta = nullptr; MetaData::Equip* helmet_meta = nullptr;
MetaData::Equip* chest_meta = nullptr; MetaData::Equip* chest_meta = nullptr;

View File

@ -63,6 +63,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
hum->today_enter_times = msg.today_enter_times(); hum->today_enter_times = msg.today_enter_times();
hum->create_tick = a8::XGetTickCount(); hum->create_tick = a8::XGetTickCount();
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id()); hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
hum->channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
hum->atk_add = msg.atk_add(); hum->atk_add = msg.atk_add();
hum->emoji1 = msg.emoji1(); hum->emoji1 = msg.emoji1();
hum->emoji2 = msg.emoji2(); hum->emoji2 = msg.emoji2();