public FFGate(string strName = "gate#0") { m_nIDGenerator = 0; m_nGateIndex = 0; m_strGateName = strName; m_ffrpc = null; m_dictClients = new Dictionary <Int64, ClientInfo>(); m_msgEmpty = new EmptyMsgRet(); m_acceptor = null; }
public FFWorker() { m_nIDGenerator = 0; m_nWorkerIndex = 0; m_strWorkerName = ""; m_strDefaultGate = "gate#0"; m_ffrpc = null; m_dictCmd2Func = new Dictionary <int, CmdRegInfo>(); RPC_NONE = new EmptyMsgRet(); m_listEnableClassNames = null; }
public FFWorker() { m_nIDGenerator = 0; m_nWorkerIndex = 0; m_strWorkerName = ""; m_strDefaultGate = "gate#0"; m_ffrpc = null; m_dictRoles = new Dictionary <Int64, Role>(); m_dictCmd2Func = new Dictionary <int, CmdHandler>(); RPC_NONE = new EmptyMsgRet(); this.BindHandler <Pbmsg.LoginReq>(Pbmsg.ClientCmdDef.CLogin, this.HandleLogin) .BindHandler <Pbmsg.RunReq>(Pbmsg.ClientCmdDef.CRun, this.HandleRun) .BindHandler <Pbmsg.AttackReq>(Pbmsg.ClientCmdDef.CAttack, this.HandleAttack) ; int nGenId = 80; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物1", x = 29, y = 29 }; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物2", x = 42, y = 27 }; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物3", x = 48, y = 19 }; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物4", x = 52, y = 31 }; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物5", x = 45, y = 45 }; nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物6", x = 51, y = 60 }; }
public FFWorker() { m_nIDGenerator = 0; m_nWorkerIndex = 0; m_strWorkerName = ""; m_strDefaultGate = "gate#0"; m_ffrpc = null; m_dictRoles = new Dictionary <Int64, Role>(); m_dictCmd2Func = new Dictionary <int, CmdHandler>(); RPC_NONE = new EmptyMsgRet(); this.BindHandler <Pbmsg.LoginReq>(Pbmsg.ClientCmdDef.CLogin, this.HandleLogin) .BindHandler <Pbmsg.RunReq>(Pbmsg.ClientCmdDef.CRun, this.HandleRun) .BindHandler <Pbmsg.AttackReq>(Pbmsg.ClientCmdDef.CAttack, this.HandleAttack) ; int nGenId = 10000; int num = 0; for (int i = 0; i < 3; ++i) { string strName = string.Format("尸霸{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 18 + 20 - (int)MapCfg.CenterX + i * 2, y = 28 + 30 - (int)MapCfg.CenterY - i, apprID = 69 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("蓝魔{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 12 + 20 - (int)MapCfg.CenterX + i * 2, y = 32 + 30 - (int)MapCfg.CenterY - i, apprID = 102 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("山魔{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 15 + 20 - (int)MapCfg.CenterX + i * 2, y = 40 + 30 - (int)MapCfg.CenterY - i, apprID = 103 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("黑暗魔王{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 20 + 20 - (int)MapCfg.CenterX + i * 2, y = 40 + 30 - (int)MapCfg.CenterY - i, apprID = 104 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("双足蜥蜴{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 25 + 20 - (int)MapCfg.CenterX + i * 2, y = 39 + 30 - (int)MapCfg.CenterY - i, apprID = 105 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("变异蜘蛛{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 25 + 20 - (int)MapCfg.CenterX + i * 2, y = 28 + 30 - (int)MapCfg.CenterY - i, apprID = 106 }; } for (int i = 0; i < num; ++i) { string strName = string.Format("土妖{0}", i + 1); nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = strName, x = 16 + 20 - (int)MapCfg.CenterX + i * 2, y = 30 - i, apprID = 100 }; } //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物2", x = 42 + xOffset, y = 27 + yOffset, apprID = 10002}; //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物3", x = 48 + xOffset, y = 19 + yOffset, apprID = 10003}; //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物4", x = 52 + xOffset, y = 31 + yOffset, apprID = 10004}; //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物5", x = 45 + xOffset, y = 45 + yOffset, apprID = 10005}; //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物6", x = 51 + xOffset, y = 50 + yOffset, apprID = 10006}; //nGenId++; m_dictRoles[nGenId] = new Monster() { nSessionID = nGenId, strName = "大怪物7", x = 55 + xOffset, y = 55 + yOffset, apprID = 10007 }; }