private void ParseEntities(XmlNode entityXml) { foreach (XmlNode energyTankNode in entityXml.SelectNodes("EnergyTank")) { m_energyTanks.Add(new EnergyTankTemplate(energyTankNode)); } foreach (XmlNode treasureNode in entityXml.SelectNodes("Treasure")) { m_treasures.Add(new TreasureTemplate(treasureNode)); } foreach (XmlNode trapNode in entityXml.SelectNodes("Trap")) { m_traps.Add(new TrapTemplate(trapNode)); } foreach (XmlNode mobSpawnerNode in entityXml.SelectNodes("MobSpawner")) { m_mobSpawners.Add(new MobSpawnerTemplate(mobSpawnerNode)); } m_portalRoomSideBitmask.Clear(); foreach (XmlNode portalNode in entityXml.SelectNodes("Portal")) { PortalTemplate portalTemplate = new PortalTemplate(portalNode); m_portals.Add(portalTemplate); if (portalTemplate.PortalRoomSide != MathConstants.eSignedDirection.none) { m_portalRoomSideBitmask.Set(portalTemplate.PortalRoomSide, true); } } }
private TypedFlags <eBindGameAction> LookupCharacterData( RequestCache requestCache) { TypedFlags <eBindGameAction> actionFlags = new TypedFlags <eBindGameAction>(); actionFlags.Clear(); // Get the current state of the character before moving them to another game m_character_state = CharacterQueries.GetFullCharacterState(requestCache.DatabaseContext, m_character_id); // Get the previous game this character was a part of, if any m_previous_game_id = m_character_state.game_id; // Only bother doing anything if the character isn't already bound to this game if (m_previous_game_id != m_game_id) { if (m_previous_game_id != -1) { actionFlags.Set(eBindGameAction.leaveGame, true); } actionFlags.Set(eBindGameAction.joinGame, true); } return(actionFlags); }
private TypedFlags<eBindGameAction> LookupCharacterData( RequestCache requestCache) { TypedFlags<eBindGameAction> actionFlags = new TypedFlags<eBindGameAction>(); actionFlags.Clear(); // Get the current state of the character before moving them to another game m_character_state = CharacterQueries.GetFullCharacterState(requestCache.DatabaseContext, m_character_id); // Get the previous game this character was a part of, if any m_previous_game_id = m_character_state.game_id; // Only bother doing anything if the character isn't already bound to this game if (m_previous_game_id != m_game_id) { if (m_previous_game_id != -1) { actionFlags.Set(eBindGameAction.leaveGame, true); } actionFlags.Set(eBindGameAction.joinGame, true); } return actionFlags; }