Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a3f965089a | ||
![]() |
ce956abef3 | ||
![]() |
94fc41091d | ||
![]() |
46f1b52cba | ||
![]() |
4faaedd690 | ||
![]() |
8fb91ad06c |
@ -781,9 +781,6 @@ void Buff::ProcDive()
|
||||
},
|
||||
&xtimer_attacher.timer_list_
|
||||
);
|
||||
if (owner->IsHuman()) {
|
||||
++owner->AsHuman()->stats.diving_times;
|
||||
}
|
||||
}
|
||||
|
||||
void Buff::ProcRemoveDive()
|
||||
|
@ -62,11 +62,7 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
sender.Get()->context_pos = GetPos();
|
||||
|
||||
for (auto& target : objects) {
|
||||
bool old_is_dead = target->IsDead(room);
|
||||
target->OnBulletHit(this);
|
||||
if (target->IsDead(room) && !old_is_dead) {
|
||||
OnKillTarget(target);
|
||||
}
|
||||
}
|
||||
|
||||
sender.Get()->context_dir = old_context_dir;
|
||||
@ -192,9 +188,6 @@ void Bullet::ProcBomb()
|
||||
case IS_RPG:
|
||||
{
|
||||
//榴弹炮
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
a8::Vec2 bomb_pos = GetPos();
|
||||
room->frame_event.AddExplosionEx(sender,
|
||||
meta->i->id(),
|
||||
@ -206,18 +199,12 @@ void Bullet::ProcBomb()
|
||||
case IS_FRAG:
|
||||
{
|
||||
//手雷
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcFragBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
case IS_SMOKE:
|
||||
{
|
||||
//烟雾弹
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
#if 1
|
||||
AddGunBuff();
|
||||
#else
|
||||
@ -234,27 +221,18 @@ void Bullet::ProcBomb()
|
||||
case IS_POSION_GAS_BOMB:
|
||||
{
|
||||
//毒气弹
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcPosionGasBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
case IS_MOLOTOR_COCKTAIL:
|
||||
{
|
||||
//燃烧瓶
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcMolotorCocktailBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
case IS_C4:
|
||||
{
|
||||
//c4
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
if (block) {
|
||||
delay_time = gun_meta->i->missiles_time();
|
||||
}
|
||||
@ -263,25 +241,16 @@ void Bullet::ProcBomb()
|
||||
break;
|
||||
case IS_SINGAL_GUN:
|
||||
{
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcSignalGunBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
case IS_SHIELD_WALL:
|
||||
{
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcShieldWallBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
case IS_OIL_BUCKET:
|
||||
{
|
||||
if (sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponUseTimes(gun_meta->i->id(), 1);
|
||||
}
|
||||
ProcOilBucketBomb(delay_time);
|
||||
}
|
||||
break;
|
||||
@ -657,13 +626,3 @@ bool Bullet::IsPreBattleBullet()
|
||||
{
|
||||
return create_frameno_ <= room->GetBattleStartFrameNo() || room->GetBattleStartFrameNo() == 0;
|
||||
}
|
||||
|
||||
void Bullet::OnKillTarget(Entity* target)
|
||||
{
|
||||
if (target->IsCreature(room)) {
|
||||
Creature* c = (Creature*)target;
|
||||
if (c->IsHuman() && sender.Get() && sender.Get()->IsHuman()) {
|
||||
sender.Get()->AsHuman()->stats.IncWeaponKills(gun_meta->i->id(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ protected:
|
||||
inline void MapServiceUpdate();
|
||||
void Check(float distance);
|
||||
void AddGunBuff();
|
||||
void OnKillTarget(Entity* target);
|
||||
|
||||
private:
|
||||
CircleCollider* self_collider_ = nullptr;
|
||||
|
@ -384,10 +384,6 @@ void Car::DecHP(float dec_hp, int killer_id, const std::string& killer_name, int
|
||||
|
||||
void Car::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
{
|
||||
Human* killer = room->GetHumanByUniId(killer_id);
|
||||
if (killer) {
|
||||
++killer->stats.destory_car_times;
|
||||
}
|
||||
dead = true;
|
||||
later_removed_ = true;
|
||||
if (hero_meta_->i->delay_remove() > 0) {
|
||||
@ -531,15 +527,3 @@ void Car::RemoveFromScene()
|
||||
room->RemoveObjectLater(this);
|
||||
room->NotifyUiUpdate();
|
||||
}
|
||||
|
||||
void Car::OnKillTarget(Creature* target)
|
||||
{
|
||||
if (target->IsHuman()) {
|
||||
for (auto passenger : passengers_) {
|
||||
++passenger->stats.ride_car_kills;
|
||||
}
|
||||
if (driver_) {
|
||||
++driver_->stats.ride_car_kills;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ class Car : public Creature
|
||||
virtual void SendDebugMsg(const std::string& debug_msg) override;
|
||||
virtual void SetAttackDir(const a8::Vec2& attack_dir) override;
|
||||
virtual void DropItems(Obstacle* obstacle) override;
|
||||
void OnKillTarget(Creature* target);
|
||||
|
||||
private:
|
||||
int AllocSeat();
|
||||
|
@ -648,26 +648,6 @@ void Creature::RecalcBuffAttr()
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto& tuple : talent_list) {
|
||||
auto talent_meta = MetaMgr::Instance()->GetTalent(std::get<0>(tuple), std::get<1>(tuple));
|
||||
if (talent_meta) {
|
||||
for (auto& tuple1 : talent_meta->addattr) {
|
||||
int attr_type = std::get<0>(tuple1);
|
||||
int attr_val = std::get<1>(tuple1);
|
||||
if (talent_meta->i->addtype() == 0) {
|
||||
float* p = ability_->GetBuffAttrAbsPtr(attr_type);
|
||||
if (p) {
|
||||
*p += attr_val;
|
||||
}
|
||||
} else if (talent_meta->i->addtype() == 1) {
|
||||
float* p = ability_->GetBuffAttrRatePtr(attr_type);
|
||||
if (p) {
|
||||
*p += attr_val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (need_refresh_hp) {
|
||||
SetHP(GetMaxHP());
|
||||
GetTrigger()->HpChg();
|
||||
@ -941,9 +921,6 @@ void Creature::DoSkill(int skill_id,
|
||||
}
|
||||
GetTrigger()->UseSkill(skill);
|
||||
DoSkillPostProc(true, skill_id, target_id, target_pos);
|
||||
if (IsHuman()) {
|
||||
++AsHuman()->stats.use_skill_times;
|
||||
}
|
||||
#if 0
|
||||
if (skill_id != TURN_OVER_SKILL_ID) {
|
||||
#else
|
||||
@ -1131,9 +1108,6 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
||||
if (action_type != AT_None) {
|
||||
CancelAction();
|
||||
}
|
||||
if (IsHuman()) {
|
||||
++AsHuman()->stats.use_camouflage_times;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case kBET_BePull:
|
||||
|
@ -94,8 +94,6 @@ class Creature : public MoveableEntity
|
||||
a8::Vec2 context_dir;
|
||||
std::shared_ptr<Ability> context_ability;
|
||||
|
||||
std::vector<std::tuple<int, int>> talent_list;
|
||||
|
||||
bool need_sync_active_player = false;
|
||||
std::function<void ()> on_loading_bullet;
|
||||
CreatureWeakPtr follow_target;
|
||||
|
@ -40,58 +40,6 @@
|
||||
const int kReviveTimeAdd = 12;
|
||||
const int kSkinNum = 4;
|
||||
|
||||
WeaponStats& PlayerStats::MustBeWeapon(int weapon_id)
|
||||
{
|
||||
auto itr = weapon_stats.find(weapon_id);
|
||||
if (itr == weapon_stats.end()){
|
||||
WeaponStats weapon;
|
||||
weapon_stats[weapon_id] = weapon;
|
||||
itr = weapon_stats.find(weapon_id);
|
||||
}
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
void PlayerStats::IncWeaponKills(int weapon_id, int val)
|
||||
{
|
||||
MustBeWeapon(weapon_id).kills += val;
|
||||
}
|
||||
|
||||
void PlayerStats::IncWeaponDamageOut(int weapon_id, int val)
|
||||
{
|
||||
MustBeWeapon(weapon_id).damage_out += val;
|
||||
}
|
||||
|
||||
void PlayerStats::IncWeaponObtainCount(int weapon_id, int val)
|
||||
{
|
||||
MustBeWeapon(weapon_id).obtain_count += val;
|
||||
}
|
||||
|
||||
void PlayerStats::IncWeaponUseTimes(int weapon_id, int val)
|
||||
{
|
||||
MustBeWeapon(weapon_id).use_times += val;
|
||||
}
|
||||
|
||||
HeroStats& PlayerStats::MustBeHero(int hero_id)
|
||||
{
|
||||
auto itr = hero_stats.find(hero_id);
|
||||
if (itr == hero_stats.end()){
|
||||
HeroStats hero;
|
||||
hero_stats[hero_id] = hero;
|
||||
itr = hero_stats.find(hero_id);
|
||||
}
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
void PlayerStats::SetHeroSkillLv(int hero_id, int skill_lv)
|
||||
{
|
||||
MustBeHero(hero_id).skill_lv = std::max(MustBeHero(hero_id).skill_lv, skill_lv);
|
||||
}
|
||||
|
||||
void PlayerStats::SetHeroWeaponLv(int hero_id, int weapon_lv)
|
||||
{
|
||||
MustBeHero(hero_id).weapon_lv = std::max(MustBeHero(hero_id).weapon_lv, weapon_lv);
|
||||
}
|
||||
|
||||
Human::Human():Creature()
|
||||
{
|
||||
default_weapon.weapon_idx = 0;
|
||||
@ -1772,70 +1720,63 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
|
||||
params->SetVal("session_id", session_id);
|
||||
params->SetVal("map_id", room->GetMapMeta()->i->map_id());
|
||||
params->SetVal("map_name", room->GetMapMeta()->i->map_name());
|
||||
params->SetVal("team_mode", GetTeam() && GetTeam()->GetMemberNum() > 1 ? 1 : 0);
|
||||
params->SetVal("map_tpl_name", room->GetMapTplName());
|
||||
params->SetVal("room_uuid", room->GetRoomUuid());
|
||||
params->SetVal("game_time", time(nullptr)); //?
|
||||
params->SetVal("game_time", time(nullptr));
|
||||
params->SetVal("hurt", stats.damage_amount_in);
|
||||
params->SetVal("rank", rank);
|
||||
params->SetVal("kills", stats.kills);
|
||||
params->SetVal("harm", stats.damage_amount_out);
|
||||
params->SetVal("add_HP", stats.heal_amount);
|
||||
if (!dead) {
|
||||
params->SetVal("alive_time", room->GetFrameNo() * 1000.0f / SERVER_FRAME_RATE);
|
||||
} else {
|
||||
params->SetVal("alive_time", dead_frameno * 1000.0f / SERVER_FRAME_RATE);
|
||||
}
|
||||
params->SetVal("ranked", rank);
|
||||
params->SetVal("kills", stats.kills);
|
||||
params->SetVal("damage_out", stats.damage_amount_out);
|
||||
params->SetVal("rescue_teammate_times", stats.rescue_member);
|
||||
params->SetVal("diving_times", stats.diving_times);
|
||||
params->SetVal("damage_in", stats.damage_amount_in);
|
||||
params->SetVal("recover_hp", stats.heal_amount);
|
||||
params->SetVal("open_airdrop_times", stats.open_airdrop_times);
|
||||
params->SetVal("use_medicine_times", stats.use_medicine_times);
|
||||
params->SetVal("destory_car_times", stats.destory_car_times);
|
||||
params->SetVal("use_camouflage_times", stats.use_camouflage_times);
|
||||
params->SetVal("use_skill_times", stats.use_skill_times);
|
||||
params->SetVal("ride_car_move_distance", stats.ride_car_move_distance);
|
||||
params->SetVal("ride_car_kills", stats.ride_car_kills);
|
||||
params->SetVal("max_hero_skill_lv", stats.max_hero_skill_lv);
|
||||
params->SetVal("team_status", GetTeam() && GetTeam()->GetMemberNum() > 1 ? 1 : 0);
|
||||
params->SetVal("room_uuid", room->GetRoomUuid());
|
||||
|
||||
int snipe_kill = 0;
|
||||
int rifle_kill = 0;
|
||||
int pistol_kill = 0;
|
||||
int submachine_kill = 0;
|
||||
for (Human* hum : kill_humans) {
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(stats.weapon_id);
|
||||
if (equip_meta) {
|
||||
switch (equip_meta->i->equip_subtype()) {
|
||||
case 7:
|
||||
{
|
||||
std::string weapons_type;
|
||||
std::string weapons_slot;
|
||||
for (auto& pair : stats.weapon_stats) {
|
||||
auto& weapon = pair.second;
|
||||
if (weapon.kills || weapon.damage_out || weapon.obtain_count) {
|
||||
weapons_type += a8::Format("%d:%d:%d:%d|",
|
||||
//狙击枪
|
||||
++snipe_kill;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
weapon.weapon_id,
|
||||
weapon.kills,
|
||||
weapon.damage_out,
|
||||
weapon.obtain_count
|
||||
});
|
||||
//步枪
|
||||
++rifle_kill;
|
||||
}
|
||||
if (weapon.use_times) {
|
||||
weapons_slot += a8::Format("%d:%d|",
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
weapon.weapon_id,
|
||||
weapon.use_times
|
||||
});
|
||||
}
|
||||
}
|
||||
params->SetVal("weapons_type", weapons_type);
|
||||
params->SetVal("weapons_slot", weapons_slot);
|
||||
//手枪
|
||||
++pistol_kill;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
std::string heros;
|
||||
for (auto& pair : stats.hero_stats) {
|
||||
auto& hero = pair.second;
|
||||
if (hero.skill_lv || hero.weapon_lv) {
|
||||
heros += a8::Format("%d:%d:%d|",
|
||||
{
|
||||
hero.hero_id,
|
||||
hero.skill_lv,
|
||||
hero.weapon_lv,
|
||||
});
|
||||
//冲锋枪
|
||||
++submachine_kill;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
params->SetVal("heros", heros);
|
||||
}
|
||||
params->SetVal("snipe_kill", snipe_kill);
|
||||
params->SetVal("rifle_kill", rifle_kill);
|
||||
params->SetVal("pistol_kill", pistol_kill);
|
||||
params->SetVal("submachine_kill", submachine_kill);
|
||||
|
||||
params->SetVal("rescue_member", stats.rescue_member);
|
||||
params->SetVal("rescue_guild_member", stats.rescue_guild_member);
|
||||
{
|
||||
float rank_param = MetaMgr::Instance()->GetRankRewardParam(rank);
|
||||
float kill_param = MetaMgr::Instance()->GetKillRewardParam(stats.kills);
|
||||
@ -2347,7 +2288,6 @@ void Human::DropItems(Obstacle* obstacle)
|
||||
return;
|
||||
}
|
||||
if (room->GetRoomType() == RT_NewBrid && IsPlayer()) {
|
||||
++stats.open_airdrop_times;
|
||||
if (is_treasure_box) {
|
||||
if (box_drop_times_ < MetaMgr::Instance()->newbie_airdrop.size()) {
|
||||
drop_id = MetaMgr::Instance()->newbie_airdrop[box_drop_times_];
|
||||
@ -2813,7 +2753,6 @@ void Human::ProcUseItemAction()
|
||||
switch (action_item_id) {
|
||||
case IS_HEALTHKIT:
|
||||
{
|
||||
+stats.use_medicine_times;
|
||||
AddHp(item_meta->i->heal() * (1 + GetAbility()->GetAttrRate(kHAT_DrugEfficacy)));
|
||||
DecInventory(item_meta->i->_inventory_slot(), 1);
|
||||
GetTrigger()->UseItemAction(action_item_id);
|
||||
@ -2821,7 +2760,6 @@ void Human::ProcUseItemAction()
|
||||
break;
|
||||
case IS_PAIN_KILLER:
|
||||
{
|
||||
+stats.use_medicine_times;
|
||||
if (pain_killer_timer) {
|
||||
int passed_time = (room->GetFrameNo() - pain_killer_frameno) * FRAME_RATE_MS;
|
||||
int left_time = std::max(0, pain_killer_lastingtime * 1000 - passed_time);
|
||||
@ -2864,7 +2802,6 @@ void Human::ProcUseItemAction()
|
||||
break;
|
||||
case IS_SHEN_BAO:
|
||||
{
|
||||
+stats.use_medicine_times;
|
||||
if (!dead) {
|
||||
if (downed) {
|
||||
SetHP(MetaMgr::Instance()->GetSysParamAsInt("downed_relive_recover_hp"));
|
||||
@ -3266,10 +3203,6 @@ void Human::OnBulletHit(Bullet* bullet)
|
||||
}
|
||||
} else {
|
||||
if (!bullet->IsPreBattleBullet()) {
|
||||
if (bullet->sender.Get() && bullet->sender.Get()->IsHuman()) {
|
||||
bullet->sender.Get()->AsHuman()->stats.IncWeaponDamageOut
|
||||
(bullet->gun_meta->i->id(), finaly_dmg);
|
||||
}
|
||||
DecHP(finaly_dmg,
|
||||
bullet->sender.Get()->GetUniId(),
|
||||
bullet->sender.Get()->GetName(),
|
||||
|
@ -22,22 +22,6 @@ struct HumanBehavior
|
||||
int total_destory_box_times = 0;
|
||||
};
|
||||
|
||||
struct WeaponStats
|
||||
{
|
||||
int weapon_id = 0;
|
||||
int kills = 0;
|
||||
int damage_out = 0;
|
||||
int obtain_count = 0;
|
||||
int use_times = 0;
|
||||
};
|
||||
|
||||
struct HeroStats
|
||||
{
|
||||
int hero_id = 0;
|
||||
int skill_lv = 0;
|
||||
int weapon_lv = 0;
|
||||
};
|
||||
|
||||
struct PlayerStats
|
||||
{
|
||||
int kills = 0;
|
||||
@ -53,19 +37,6 @@ struct PlayerStats
|
||||
int history_damage_amount = 0;
|
||||
int history_heal_amount = 0;
|
||||
|
||||
int diving_times = 0;
|
||||
int open_airdrop_times = 0;
|
||||
int use_medicine_times = 0;
|
||||
int destory_car_times = 0;
|
||||
int use_camouflage_times = 0;
|
||||
int use_skill_times = 0;
|
||||
int ride_car_move_distance = 0;
|
||||
int ride_car_kills = 0;
|
||||
int max_hero_skill_lv = 0;
|
||||
|
||||
std::map<int, WeaponStats> weapon_stats;
|
||||
std::map<int, HeroStats> hero_stats;
|
||||
|
||||
int gold = 0;
|
||||
int score = 0;
|
||||
std::vector<std::pair<int, int>> items;
|
||||
@ -82,15 +53,6 @@ struct PlayerStats
|
||||
int skill_times = 0;
|
||||
|
||||
int dead_times = 0;
|
||||
|
||||
WeaponStats& MustBeWeapon(int weapon_id);
|
||||
void IncWeaponKills(int weapon_id, int val);
|
||||
void IncWeaponDamageOut(int weapon_id, int val);
|
||||
void IncWeaponObtainCount(int weapon_id, int val);
|
||||
void IncWeaponUseTimes(int weapon_id, int val);
|
||||
HeroStats& MustBeHero(int hero_id);
|
||||
void SetHeroSkillLv(int hero_id, int skill_lv);
|
||||
void SetHeroWeaponLv(int hero_id, int weapon_lv);
|
||||
};
|
||||
|
||||
struct xtimer_list;
|
||||
|
@ -1530,21 +1530,6 @@ namespace MetaData
|
||||
|
||||
}
|
||||
|
||||
void GunTalentGrow::Init()
|
||||
{
|
||||
std::vector<std::string> tmp_strs1;
|
||||
a8::Split(i->addattr(), tmp_strs1, '|');
|
||||
for (std::string& str : tmp_strs1) {
|
||||
std::vector<std::string> tmp_strs2;
|
||||
a8::Split(str, tmp_strs2, ':');
|
||||
if (tmp_strs2.size() >= 2) {
|
||||
addattr.push_back(
|
||||
std::make_tuple(a8::XValue(tmp_strs2[0]), a8::XValue(tmp_strs2[1]))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Item::Init()
|
||||
{
|
||||
|
||||
|
@ -322,15 +322,6 @@ namespace MetaData
|
||||
const metatable::KillPoint* i = nullptr;
|
||||
};
|
||||
|
||||
struct GunTalentGrow
|
||||
{
|
||||
const metatable::GunTalentGrow* i = nullptr;
|
||||
|
||||
std::vector<std::tuple<int, int>> addattr;
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
struct AI
|
||||
{
|
||||
const metatable::AI* i = nullptr;
|
||||
|
@ -189,7 +189,6 @@ public:
|
||||
std::list<MetaData::AI> ai_list;
|
||||
std::list<metatable::Text> text_meta_list;
|
||||
std::list<metatable::TerrainJson> terrain_meta_list;
|
||||
std::list<metatable::GunTalentGrow> talent_meta_list;
|
||||
|
||||
std::map<std::string, MetaData::Parameter*> parameter_hash;
|
||||
std::map<int, MetaData::Map*> gamemap_hash;
|
||||
@ -226,7 +225,6 @@ public:
|
||||
std::map<long long, MetaData::AI*> android_ai_hash;
|
||||
std::map<int, MetaData::AI*> ai_hash;
|
||||
std::map<std::string, std::string> text_hash;
|
||||
std::map<int, std::shared_ptr<MetaData::GunTalentGrow>> talent_hash;
|
||||
std::map<std::string, std::vector<std::tuple<int, std::string>>> text_element_hash;
|
||||
|
||||
int curr_group_id = 1001;
|
||||
@ -277,7 +275,6 @@ public:
|
||||
f8::ReadCsvMetaFile(res_path + "robot@robot.csv", robot_meta_list);
|
||||
f8::ReadCsvMetaFile(res_path + "ai@ai.csv", ai_meta_list);
|
||||
f8::ReadCsvMetaFile(res_path + "text@text.csv", text_meta_list);
|
||||
f8::ReadCsvMetaFile(res_path + "gunTalentGrow@gunTalentGrow.csv", talent_meta_list);
|
||||
f8::ReadJsonMetaFile(res_path + "terrain.json", terrain_meta_list);
|
||||
BindToMetaData();
|
||||
#if 1
|
||||
@ -897,13 +894,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& meta : talent_meta_list) {
|
||||
std::shared_ptr<MetaData::GunTalentGrow> item = std::make_shared<MetaData::GunTalentGrow>();
|
||||
item->i = &meta;
|
||||
item->Init();
|
||||
talent_hash[a8::MakeInt64(meta.talent_id(), meta.talent_lv())] = item;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1217,12 +1207,6 @@ std::vector<std::tuple<int, std::string>>* MetaMgr::GetTextElements(const std::s
|
||||
return itr != loader_->text_element_hash.end() ? &itr->second : nullptr;
|
||||
}
|
||||
|
||||
MetaData::GunTalentGrow* MetaMgr::GetTalent(int talent_id, int talent_lv)
|
||||
{
|
||||
auto itr = loader_->talent_hash.find(a8::MakeInt64(talent_id, talent_lv));
|
||||
return itr != loader_->talent_hash.end() ? itr->second.get() : nullptr;
|
||||
}
|
||||
|
||||
MetaData::Item* MetaMgr::GetItem(int id)
|
||||
{
|
||||
auto itr = loader_->item_hash.find(id);
|
||||
|
@ -52,7 +52,6 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
MetaData::Dress* GetDress(int dress_id);
|
||||
MetaData::Dress* RandDress();
|
||||
MetaData::RankReward* GetRankReward(int rank);
|
||||
MetaData::GunTalentGrow* GetTalent(int talent_id, int talent_lv);
|
||||
float GetRankRewardParam(int rank);
|
||||
float GetKillRewardParam(int kill_num);
|
||||
int GetRankPointParam1(int rank);
|
||||
|
@ -127,11 +127,6 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
|
||||
#else
|
||||
hum->SetSkinInfo(msg.baseskin());
|
||||
#endif
|
||||
for (auto& pair : msg.talent_list()) {
|
||||
hum->talent_list.push_back(
|
||||
std::make_tuple(pair.key(), pair.value())
|
||||
);
|
||||
}
|
||||
socket_hash_[socket] = hum;
|
||||
return hum;
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "skill.h"
|
||||
#include "room.h"
|
||||
#include "human.h"
|
||||
#include "car.h"
|
||||
|
||||
void Trigger::Init()
|
||||
{
|
||||
@ -108,9 +107,6 @@ void Trigger::Kill(Creature* target)
|
||||
owner_->AsHuman()->kill_humans.insert(target->AsHuman());
|
||||
owner_->AsHuman()->SyncAroundPlayers(__FILE__, __LINE__, __func__);
|
||||
}
|
||||
if (owner_->IsCar()) {
|
||||
owner_->AsCar()->OnKillTarget(target);
|
||||
}
|
||||
++kill_num_;
|
||||
TraverseCondBuffs
|
||||
(kCondBuffKillTarget,
|
||||
|
@ -415,15 +415,6 @@ message Text
|
||||
optional string text = 2;
|
||||
}
|
||||
|
||||
message GunTalentGrow
|
||||
{
|
||||
optional int32 id = 1;
|
||||
optional int32 talent_id = 2;
|
||||
optional int32 talent_lv = 3;
|
||||
optional int32 addtype = 4;
|
||||
optional string addattr = 5;
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
message DoorObjJson
|
||||
|
Loading…
x
Reference in New Issue
Block a user