少年修仙传客户端代码仓库
client_linchunjie
2018-09-17 21a37c61e717908a25a017ce63d7d21b94e5f17a
System/PlayerDead/PlayerDeadModel.cs
@@ -4,6 +4,7 @@
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
using System.Text;
public class PlayerDeadModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
{
@@ -21,6 +22,7 @@
    public void OnBeforePlayerDataInitialize()
    {
        npcRealmLv = 0;
        IsCanReborn = false;
        isOpenPrompting = true;
        this.deadCD = 0;
@@ -82,9 +84,10 @@
    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)
    {
        npcRealmLv = 0;
        switch(key)
        {
            case "PK_lhs_318691":
@@ -101,6 +104,7 @@
                    if(nPCConfig != null)
                    {
                        killerName = nPCConfig.charName;
                        npcRealmLv = nPCConfig.Realm;
                    }
                    isKillByPlayer = false;
                }
@@ -108,6 +112,19 @@
        }
    }
    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;