This commit is contained in:
aozhiwei 2023-07-16 13:32:44 +08:00
parent 8a53586b77
commit b120b4355a
3 changed files with 29 additions and 20 deletions

View File

@ -2678,27 +2678,27 @@ void Creature::OnLand()
} }
} }
gun_grasp_->Init(); gun_grasp_->Init();
#ifdef DEBUG if (IsPlayer() && GetBattleContext()->GetHonor()) {
room->xtimer.SetTimeoutWpEx room->xtimer.SetTimeoutWpEx
( (
SERVER_FRAME_RATE, SERVER_FRAME_RATE,
[this] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)
{ {
if (a8::TIMER_EXEC_EVENT == event) { if (a8::TIMER_EXEC_EVENT == event) {
if (IsPlayer()) { if (IsPlayer()) {
room->frame_event.AddPropChg room->frame_event.AddPropChg
( (
GetWeakPtrRef(), GetWeakPtrRef(),
kPropShowHonor, kPropShowHonor,
0, 0,
0, 0,
true true
); );
}
} }
} },
}, &xtimer_attacher);
&xtimer_attacher); }
#endif
} }
void Creature::CheckBulletHitHoldShield(IBullet* bullet, bool& eat) void Creature::CheckBulletHitHoldShield(IBullet* bullet, bool& eat)

View File

@ -1112,3 +1112,8 @@ int BattleDataContext::GetBattleTimes()
{ {
return battle_times_; return battle_times_;
} }
int BattleDataContext::GetHonor()
{
return honor_;
}

View File

@ -86,6 +86,8 @@ struct BattleDataContext
int GetCurrentGetStar(); int GetCurrentGetStar();
int GetBattleTimes(); int GetBattleTimes();
int GetHonor();
private: private:
void Clear(); void Clear();
float GetTotalAtk(IBullet* bullet); float GetTotalAtk(IBullet* bullet);
@ -109,6 +111,8 @@ private:
int rank_ = 0; int rank_ = 0;
int honor_ = 0;
int skin_id_ = 0; int skin_id_ = 0;
int level_ = 0; int level_ = 0;
int hero_lv_ = 0; int hero_lv_ = 0;