| | |
| | | using UnityEngine;
|
| | | using System.Collections.Generic;
|
| | | using System.Collections;
|
| | | using System.Text;
|
| | |
|
| | | public class PlayerDeadModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | npcRealmLv = 0;
|
| | | IsCanReborn = false;
|
| | | isOpenPrompting = true;
|
| | | this.deadCD = 0;
|
| | |
| | | public int localBossState { get; private set;}
|
| | | public string killerName { get; private set; }
|
| | | public bool isKillByPlayer { get; private set; }
|
| | |
|
| | | public int npcRealmLv { get; private set; }
|
| | | private void RefreshPlayerDieInfo(string key, ArrayList infolist)
|
| | | {
|
| | | switch(key)
|
| | | npcRealmLv = 0;
|
| | | switch (key)
|
| | | {
|
| | | case "PK_lhs_318691":
|
| | | if (infolist.Count > 0)
|
| | |
| | | if(nPCConfig != null)
|
| | | {
|
| | | killerName = nPCConfig.charName;
|
| | | npcRealmLv = nPCConfig.Realm;
|
| | | }
|
| | | isKillByPlayer = false;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool CheckIsRealmSuppress(out StringBuilder builder)
|
| | | {
|
| | | builder = new StringBuilder();
|
| | | if(npcRealmLv > PlayerDatas.Instance.baseData.realmLevel)
|
| | | {
|
| | | var curRealmConfig = Config.Instance.Get<RealmConfig>(npcRealmLv);
|
| | | builder.AppendFormat("<Img img={0}/>", curRealmConfig.Img);
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void AddlistenPlayerHP(PlayerDataRefresh type, int value)
|
| | | {
|
| | | if (type != PlayerDataRefresh.HP || value > 0 || playerIsDie) return;
|