예제 #1
0
파일: NpcCacher.cs 프로젝트: lufy001/Sgj-MZ
        public MCharacter GetFromBattleNpc(App.Model.Master.MBattleNpc mBattleNpc)
        {
            Model.Master.MNpc npc        = Get(mBattleNpc.npcId);
            MCharacter        mCharacter = GetFromNpc(npc);

            if (mBattleNpc.horse > 0)
            {
                mCharacter.horse = mBattleNpc.horse;
            }
            if (mBattleNpc.weapon > 0)
            {
                mCharacter.weapon = mBattleNpc.weapon;
            }
            if (mBattleNpc.clothes > 0)
            {
                mCharacter.clothes = mBattleNpc.clothes;
            }
            if (mBattleNpc.star > 0)
            {
                mCharacter.star = mBattleNpc.star;
            }
            mCharacter.skills       = Service.HttpClient.Deserialize <App.Model.Character.MSkill[]>(mBattleNpc.skills);
            mCharacter.coordinate.x = mBattleNpc.x;
            mCharacter.coordinate.y = mBattleNpc.y;

            return(mCharacter);
        }
예제 #2
0
파일: NpcCacher.cs 프로젝트: lufy001/Sgj-MZ
 public MCharacter GetFromNpc(Model.Master.MNpc npc)
 {
     return(MCharacter.Create(npc));
 }
예제 #3
0
파일: NpcCacher.cs 프로젝트: lufy001/Sgj-MZ
 public MCharacter GetFromNpc(int npcId)
 {
     Model.Master.MNpc npc = Get(npcId);
     return(GetFromNpc(npc));
 }