public void TestMethod1() { var session = new TGG.SocketServer.TGGSession { Player = new Player { User = new tg_user(), }, Fight = new FightItem(), TaskItems = new List <TaskItem>(), LastActiveTime = new DateTime(), SPM = new ConcurrentDictionary <string, ASObject>(), }; var user = tg_user.FindByid(1); session.Player.User = user; session.Player.Bag.Surplus = 3; TGG.Core.XML.Util.ReadBaseEntity(); //加载基表数据 Variable.OnlinePlayer.AddOrUpdate(user.id, session, (k, v) => session); TGG.Module.Scene.Service.LOGIN_ENTER_SCENE.GetInstance().CommandStart(session, null); Variable.TaskInfo.Add(new Variable.UserTaskInfo() { userid = 27, GuardSceneId = 200055 }); // TGG.Module.Building.Service.ENTER.GetInstance().CommandStart(session, null); //var roleinfo = tg_role.FindByid(12321); //TGG.Module.User.Service.Common.GetInstance().UserLvUpdate(user.id, 500, roleinfo); // TGG.Module.User.Service.Common.GetInstance().UserIdentifyUpdate(user.id, 500, roleinfo,(int) VocationType.Roles); new TGG.Share.Reward().GetReward("7_6010007_1", 1); #region 职业任务更新 //var dic = new Dictionary<string, object> { { "type", 1 }, { "npcId", 200055 }, { "taskId", 2130 } }; //TGG.Module.Task.Service.TASK_VOCATION_UPDATE.getInstance().CommandStart(session, new ASObject(dic)); #endregion #region 职业任务接受 var dic1 = new Dictionary <string, object> { { "task", 291908 } }; TGG.Module.Task.Service.TASK_VOCATION_ACCEPT.getInstance().CommandStart(session, new ASObject(dic1)); #endregion // TGG.Module.Task.Service.Common.getInstance().GetReward("6_4000013_3", session); //道具入包 // TGG.Module.Task.Service.Common.getInstance().GetReward("7_6080037_3", session); //装备入包 #region 装备购买 //var dic = new Dictionary<string, object> { { "id", 6010001 }, { "count", 1 } }; //EquipBuy(session); #endregion // TGG.Module.Task.Service.TASK_PUSH.getInstance().VocationTaskUpdate(); //TASK_VOCATION_REFRESH(session); }
public ASObject ARENA_DEKARON1(TGG.SocketServer.TGGSession session, ASObject data) { var model = new tg_bag(); model.user_id = session.Player.User.id; model.base_id = 4000013; model.type = 6; model.count = 20; //TGG.Module.Props.Service.Common.GetInstance().InBagFinishing(session, model); return(new ASObject()); }
/// <summary> /// 发送协议 /// </summary> public void SendPushCommand(TGGSession session, ASObject data, int commandNumber, int mn) { var pv = new ProtocolVo { serialNumber = 1, verificationCode = 1, moduleNumber = mn, commandNumber = commandNumber, sendTime = 1000, serverTime = (DateTime.Now.Ticks - 621355968000000000) / 10000, status = (int)ResponseType.TYPE_SUCCESS, data = data, }; session.SendData(pv); }
public ASObject YIN_JION(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.Fight.Service.YIN_JION.GetInstance().CommandStart(session, data)); }
public ASObject FIGHT_PERSONAL_JOIN(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.Fight.Service.FIGHT_PERSONAL_JOIN.GetInstance().CommandStart(session, data)); }
public ASObject LOGIN(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.User.Service.USER_LOGIN.GetInstance().CommandStart(session, data)); }
public ASObject ARENA_DEKARON(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.Arena.Service.ARENA_DEKARON.GetInstance().CommandStart(session, data)); }
public ASObject PICKUP_PROP(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.Props.Service.PROP_PICKUP.GetInstance().CommandStart(session, data)); }
public ASObject RECRUIT_REFRESH(TGG.SocketServer.TGGSession session, ASObject data) { return(TGG.Module.Role.Service.RECRUIT_REFRESH.GetInstance().CommandStart(session, data)); }
public void TestMethod1() { #region 初始session var session = new TGG.SocketServer.TGGSession { Player = new Player { User = new tg_user(), }, Fight = new FightItem(), TaskItems = new List <TaskItem>(), LastActiveTime = new DateTime(), SPM = new ConcurrentDictionary <string, ASObject>(), }; var user = tg_user.FindByid(13); session.Player.User = user; session.Player.Bag.Surplus = 3; TGG.Core.XML.Util.Init(); //加载基表数据 // Variable.OnlinePlayer.AddOrUpdate(user.id, session, (k, v) => session); //模拟登陆指令 // TGG.Module.Scene.Service.LOGIN_ENTER_SCENE..CommandStart(session, null); #endregion //调用共享模块 // new TGG.Share.Reward().GetReward("7_6010007_1", 1); #region 调用系统指令 //GetFightSet(session); //GetPlanSave(session); ////拉取方案数据 //GetWarPlan(session); ////添加防守武将 //GetRoleAdd(session); //移除防守武将 // GetRoleRemove(session); //解锁新的防守方案 // GetNewPlanOpen(session); //战报拉取 // GetWarReport(session); var dic = new Dictionary <string, object> { { "id", 10 }, { "location", 1 } }; var aso = new ASObject(dic); var att = new TGG.Module.Building.Service.ADD_ATTACK(); session.Player.UserExtend = new tg_user_extend(); session.Player.UserExtend.building_add_pro = 0; session.Player.UserExtend.building_add_pro = 0; att.CommandStart(session, aso); #if DEBUG var sw = new Stopwatch(); sw.Start(); #endif //GetFightTest(session); GetLineAdd(session); #if DEBUG sw.Stop(); TimeSpan timespan = sw.Elapsed; DisplayGlobal.log.Write(timespan.ToString()); XTrace.WriteLine("指令 {1} 运行总耗时:{0} 毫秒", timespan.ToString(), GetType().Namespace); #endif #endregion }