Example #1
0
	Bool HsGame::OnException(Int32 iCode)
	{
		static XIDVector vXID;

		//系统异常, 通知玩家进行存储
		ObjMan* pUserMan = GetObjMan(HSO_PLAYER);
		if (pUserMan)
		{
			vXID.clear();
			if (!pUserMan->CollectObjKey(vXID))
				return false;

			PostException(vXID, iCode);
		}

		//系统异常, 通知各个管理器进行存储
		ObjMan* pManagerMan = GetObjMan(HSO_MANAGER);
		if (pManagerMan)
		{
			vXID.clear();
			if (!pManagerMan->CollectObjKey(vXID))
				return false;

			PostException(vXID, iCode);
		}

		return true;
	}
Example #2
0
	Bool HsGame::TickManagers()
	{
		ObjMan* pManagerMan = GetObjMan(HSO_MANAGER);
		if (pManagerMan)
		{
			static XIDVector vXID;
			vXID.clear();
			if (!pManagerMan->CollectObjKey(vXID))
				return false;

			return PostTick(vXID);
		}
		return false;
	}
Example #3
0
	Bool HsGame::TickPlayers()
	{
		ObjMan* pUserMan = GetObjMan(HSO_PLAYER);
		if (pUserMan)
		{
			static XIDVector vXID;
			vXID.clear();
			if (!pUserMan->CollectObjKey(vXID))
				return false;

			return PostTick(vXID);
		}
		return false;
	}