public static void On_ReliveHero(int heroId) { HeroExtraInRoom heroExtraByUserId = Singleton <PvpManager> .Instance._roomInfo.GetHeroExtraByUserId(-heroId); if (heroExtraByUserId != null) { heroExtraByUserId.TimeToRelive = null; } }
public static void On_KillHero(int deadId, float passedSeconds, float maxReliveSeconds) { HeroExtraInRoom heroExtraByUserId = Singleton <PvpManager> .Instance._roomInfo.GetHeroExtraByUserId(-deadId); if (heroExtraByUserId != null) { heroExtraByUserId.TimeToRelive = new DateTime?(DateTime.Now + TimeSpan.FromSeconds((double)(maxReliveSeconds - passedSeconds))); heroExtraByUserId.ReliveInterval = TimeSpan.FromSeconds((double)maxReliveSeconds); } }
public float?GetReliveRatio(int heroUniqueId) { HeroExtraInRoom heroExtraByUserId = this._roomInfo.GetHeroExtraByUserId(-heroUniqueId); if (heroExtraByUserId != null) { return(heroExtraByUserId.ReliveRatio); } return(null); }