GetHotKeyInfo() public method

public GetHotKeyInfo ( ) : String
return String
Exemplo n.º 1
0
        //发送玩家数据信息到dbserver 保存到数据库
        //play 玩家对象
        //isExit 是否是退出游戏 -
        public void SaveRoleData(PlayerObject play,bool isExit = false)
        {
            if (!this.IsConnect())
            {
                UserEngine.Instance().AddCachePlay(play);
                Log.Instance().WriteLog("保存玩家数据失败,dbserver未连接,已加入到数据库缓冲存储区");
                return;
            }
            //人物基本属性
            SaveRoleData_Attr data = new SaveRoleData_Attr();
            GameStruct.PlayerAttribute attr = play.GetBaseAttr();

            data.accountid = attr.account_id;
            data.IsExit = isExit;
            data.name = play.GetName();
            data.lookface = attr.lookface;
            data.hair = attr.hair;
            data.level = (byte)attr.level;
            data.exp = attr.exp;
            data.life = attr.life;
            data.mana = attr.mana;
            data.profession = attr.profession;
            data.pk = attr.pk;
            data.gold = attr.gold;
            data.gamegold = attr.gamegold;
            data.stronggold = attr.stronggold;
            data.godlevel = attr.godlevel;
            data.maxeudemon = attr.maxeudemon;
            if (play.GetGameMap() == null)
            {
                data.mapid = 1000;
                data.x = 145;
                data.y = 413;
            }
            else
            {
                data.mapid = play.GetGameMap().GetMapInfo().id;
                data.x = play.GetCurrentX();
                data.y = play.GetCurrentY();
            }

            data.hotkey = play.GetHotKeyInfo();
            data.guanjue = attr.guanjue;
            GetDBClient().SendData(data.GetBuffer());
            //保存道具信息
            play.GetItemSystem().DB_Save();
            //保存技能信息
            play.GetMagicSystem().DB_Save();
            //保存幻兽信息
            play.GetEudemonSystem().DB_Save();
            //好友信息
            play.GetFriendSystem().DB_Save();
        }