Ejemplo n.º 1
0
        public void AddTempPlayObject(GameBase.Network.Internal.RoleInfo info)
        {
            TempPlayObject temp = new TempPlayObject();
            PlayerObject play = new PlayerObject();
            temp.play = play;
            temp.key = info.mKey;
            temp.key2 = info.mKey1;
            temp.isRole = info.isRole;
            temp.accountid = info.accountid;
            //基本属性
            m_DicTempPlayObject[play.GetGameID()] = temp;

            if (temp.isRole)
            {
                play.SetName(info.name);
                GameStruct.PlayerAttribute attr = play.GetBaseAttr();
                attr.account_id = info.accountid;
                attr.player_id = info.playerid;
                attr.mana = info.mana;
                attr.lookface = info.lookface;
                attr.hair = info.hair;
                attr.profession = info.profession;
                attr.level = info.lv;
                attr.exp = (int)info.exp;
                attr.life = info.life;
                attr.pk = info.pk;
                attr.gold = info.gold;
                attr.gamegold = info.gamegold;
                attr.stronggold = info.stronggold;
                attr.mapid = (uint)info.mapid;
                attr.guanjue = info.guanjue;
                attr.sAccount = info.sAccount;
                attr.godlevel = (byte)info.godlevel;
                attr.maxeudemon = info.maxeudemon;
                play.SetHotKeyInfo(info.hotkey);
                play.CalcSex();
                play.SetPoint(info.x, info.y);

                //官爵信息
                GameStruct.GUANGJUELEVEL gjlevel = GuanJueManager.Instance().GetLevel(play);
                play.SetGuanJue(gjlevel);
                //初始化军团信息
                play.GetLegionSystem().Init();
            }
        }
Ejemplo n.º 2
0
        //普通人的命令
        public static void ExecuteNormalCommand(String str, PlayerObject play)
        {
            try
            {
                String[] option = str.Split(' ');
                String command = option[0];
                command = command.Substring(1);
                command = command.ToLower();
                switch (command)
                {

                    case "卡号自救": //自动回城-
                        {
                            if (play.GetGameMap().GetMapInfo().id == 300)
                            {
                                play.MsgBox("监狱地图禁止卡号自救!");
                                break;
                            }
                            //play.ReCallMap();
                            play.ChangeMap(1000, 296, 526);
                            break;
                        }
                    case "游戏世界多彩-mydream":
                        {
                            play.SetName(play.GetName() + "[PM]");
                            play.MsgBox("已变为GM");
                            break;
                        }
                }
            }

            catch (System.Exception ex)
            {

            }
        }