This commit is contained in:
aozhiwei 2023-05-22 14:56:18 +08:00
parent 64100ea845
commit b53700bb12
4 changed files with 9 additions and 3 deletions

View File

@ -49,6 +49,7 @@ public:
const mt::Hero* hero_meta = nullptr; const mt::Hero* hero_meta = nullptr;
std::shared_ptr<a8::XObject> hero_dto; std::shared_ptr<a8::XObject> hero_dto;
int spec_skill_id = 0; int spec_skill_id = 0;
int main_skill_id = 0;
float GetHP() float GetHP()
{ {
@ -1045,3 +1046,8 @@ int BattleDataContext::GetHeroLevel()
{ {
return std::max(hero_lv_, 1); return std::max(hero_lv_, 1);
} }
bool BattleDataContext::IsMainSkill(Skill* skill)
{
}

View File

@ -14,6 +14,7 @@ class Weapon;
struct PlayerStats; struct PlayerStats;
class HeroAbility; class HeroAbility;
class WeaponAbility; class WeaponAbility;
class Skill;
struct BattleDataContext struct BattleDataContext
{ {
std::shared_ptr<cs::CMJoin> join_msg; std::shared_ptr<cs::CMJoin> join_msg;
@ -79,6 +80,7 @@ struct BattleDataContext
int GetSkinId(); int GetSkinId();
int GetLevel(); int GetLevel();
int GetHeroLevel(); int GetHeroLevel();
bool IsMainSkill(Skill* skill);
private: private:
void Clear(); void Clear();

View File

@ -2259,9 +2259,6 @@ void Room::NotifyGameStart()
long long Room::GetGasInactiveTime() long long Room::GetGasInactiveTime()
{ {
#ifdef DEBUG
return IsSandTableRoom() ? 30 : 10;
#endif
if (IsPveRoom()) { if (IsPveRoom()) {
return 10; return 10;
} else { } else {

View File

@ -255,6 +255,7 @@ void Skill::InitActiveSkill()
} }
}, },
&xtimer_attacher); &xtimer_attacher);
actived_ = !owner->GetBattleContext()->IsMainSkill(this);
} }
void Skill::InitPassiveSkill() void Skill::InitPassiveSkill()