Esempio n. 1
0
    void    AcceptDamage(ZMNetData mData)
    {
        MonsterID = mData.readInt();
        //Debug.Log( "K________OnAcceptDamage : " + MonsterID );
        MonsterNetView m = GetMonsterNetViewByMonsterID(MonsterID);                     //这句干啥的,不知道,啥注释也没有,我就火大了!CZ

        if (m != null)
        {
            string[] StrData = new     string[2];
            StrData[0] = "" + mData.readInt();
            StrData[1] = mData.readString();

            //        string[] instensids = mData.getStrings();//仇恨列表中的玩家实例ID降序
            //        string[] monsterHate = mData.getStrings();//仇恨列表中的仇恨值降序,与上面一一对应

            //for (int i = 0; i < instensids.Length; i++)
            //{
            //    NGUIDebug.Log("-------instensids---------"+instensids[i]+"--------Hate"+monsterHate[i]);
            //}


            //Debug.Log( "K________OnAcceptDamage : " + MonsterID + " ; " + StrData[0] + " ; " + StrData[1] );
            m.SendMessage("OnAcceptDamage", StrData);                   //发送消息处理指令//

            //object[] objs = new object[2];
            //objs[0] = instensids;
            //objs[1] = monsterHate;

            //m.SendMessage("ServerRemoveHatreda" , objs , SendMessageOptions.DontRequireReceiver);
        }
    }
Esempio n. 2
0
    void    AcceptMonsterDeath(ZMNetData mData)
    {
        MonsterID = mData.readInt();
        //Debug.Log( "K____________________________________________________________挂了 : " + MonsterID );
        MonsterNetView m = GetMonsterNetViewByMonsterID(MonsterID);

        if (m != null)
        {
            int[] RewardData = new     int[2];
            RewardData[0] = mData.readInt();
            RewardData[1] = mData.readInt();
            //Debug.Log( "K________OnAcceptFallBack : MonsterID = " + MonsterID + " DID = "+StrData[0] + " ;  DData = " + StrData[1] );
            m.SendMessage("OnAcceptDeath", RewardData);                 //发送消息处理指令//
        }
    }
Esempio n. 3
0
    void    AcceptFallBack(ZMNetData mData)
    {
        MonsterID = mData.readInt();
        //Debug.Log( "K__FallBack__FallBack_Fall_Fall_FallBack_OnAcceptFallBack : " + MonsterID );
        MonsterNetView m = GetMonsterNetViewByMonsterID(MonsterID);

        if (m != null)
        {
            string[] StrData = new     string[2];
            StrData[0] = "" + mData.readInt();
            StrData[1] = mData.readString();
            //Debug.Log( "K________OnAcceptFallBack : MonsterID = " + MonsterID + " DID = "+StrData[0] + " ;  DData = " + StrData[1] );
            m.SendMessage("OnAcceptDecision", StrData);                 //发送消息处理指令//
        }
    }
Esempio n. 4
0
 void    AcceptFallBack(Zealm.OperationResponse operationResponse)
 {
     int[]    MonsterIDs  = operationResponse.Parameters[0] as int[];
     int[]    DecisionIDs = operationResponse.Parameters[1] as int[];
     string[] Datas       = operationResponse.Parameters[2] as string[];
     for (int i = 0; i < MonsterIDs.Length; i++)
     {
         MonsterNetView m = GetMonsterNetViewByMonsterID(MonsterIDs[i]);
         if (m != null)
         {
             string[] StrData = new     string[2];
             StrData[0] = "" + DecisionIDs[i];
             StrData[1] = Datas[i];
             //Debug.Log( "K________OnAccetpDecision : MonsterID = " + MonsterID + " DID = "+StrData[0] + " ;  DData = " + StrData[1] );
             m.SendMessage("OnAcceptDecision", StrData);                     //发送消息处理指令//
         }
     }
 }
Esempio n. 5
0
    IEnumerator     AcceptSummonSkull(ZMNetData mData)
    {
        _PlayerID = mData.readInt();
        MonsterID = mData.readInt();
        int    PetMaxHP         = mData.readInt();
        string skullInfo        = mData.readString();
        int    playerInstanceID = mData.readInt();
        int    MonsterIDUse     = 0;

        MonsterIDUse = MonsterID;
        //	Debug.Log(	"K_____)(——+——+——+——+——+——+——+——+——+——+——返回骷髅ID:"+MonsterID	);

        if (PlayerUtil.isMine(playerInstanceID))
        {
            _PetNetView = FindPetNetViewBySummonerID(_PlayerID);

            if (_PetNetView != null)
            {
                //		Debug.Log(	"K_____)(——+——+——+——+——+——+——+——+——+——+——返回骷髅ID找到了! = "	+	MonsterID	);
                _PetNetView.MonsterID = MonsterIDUse;
                string SData = "" + MonsterIDUse;
                //		KDebug.Log(	"...................骷髅同步实例 = "	+	MonsterID,	_PetNetView.transform,	Color.yellow	);
                _PetNetView.SendMessage("AcceptSummon", SData);
            }
        }
        else
        {
            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            GameObject go = ObjectAccessor.getAOIObject(playerInstanceID);
            if (go)
            {
                go.SendMessage("ReturnCallSkull", string.Format("{0};{1};{2}", skullInfo, MonsterIDUse, playerInstanceID), SendMessageOptions.DontRequireReceiver);
            }
        }
    }