OregonCore  revision 3611e8a-git
Your Favourite TBC server
ObjectMgr.h File Reference
#include "Log.h"
#include "Object.h"
#include "Bag.h"
#include "Creature.h"
#include "Player.h"
#include "DynamicObject.h"
#include "GameObject.h"
#include "Corpse.h"
#include "QuestDef.h"
#include "ItemPrototype.h"
#include "NPCHandler.h"
#include "Database/DatabaseEnv.h"
#include "Mail.h"
#include "Map.h"
#include "ObjectAccessor.h"
#include "ObjectGuid.h"
#include "Policies/Singleton.h"
#include "Database/SQLStorage.h"
#include "Path.h"
#include "ConditionMgr.h"
#include <string>
#include <map>
#include <limits>
#include <tuple>

Go to the source code of this file.

Classes

struct  GameTele
 
struct  TempSummonGroupKey
 Key for storing temp summon data in TempSummonDataContainer. More...
 
struct  ScriptInfo
 
struct  AreaTrigger
 
struct  CellObjectGuids
 
struct  OregonStringLocale
 
struct  PetLevelInfo
 
struct  ReputationOnKillEntry
 
struct  RepSpilloverTemplate
 
struct  GossipMenuItems
 
struct  GossipMenus
 
struct  PetCreateSpellEntry
 
struct  WeatherSeasonChances
 
struct  WeatherZoneChances
 
struct  GraveYardData
 
struct  LanguageDesc
 
class  ObjectMgr
 

Macros

#define MIN_OREGON_STRING_ID   1
 
#define MAX_OREGON_STRING_ID   2000000000
 
#define MIN_DB_SCRIPT_STRING_ID   MAX_OREGON_STRING_ID
 
#define MAX_DB_SCRIPT_STRING_ID   2000010000
 
#define MIN_CREATURE_AI_TEXT_STRING_ID   (-1)
 
#define MAX_CREATURE_AI_TEXT_STRING_ID   (-1000000)
 
#define WEATHER_SEASONS   4
 
#define MAX_PLAYER_NAME   12
 
#define MAX_INTERNAL_PLAYER_NAME   15
 
#define sObjectMgr   Oregon::Singleton<ObjectMgr>::Instance()
 

Typedefs

typedef UNORDERED_MAP< uint32, GameTeleGameTeleMap
 
typedef std::multimap< uint32, ScriptInfoScriptMap
 
typedef std::map< uint32, ScriptMapScriptMapMap
 
typedef std::set< uint32CellGuidSet
 
typedef std::map< uint32, uint32CellCorpseSet
 
typedef UNORDERED_MAP< uint32, CellObjectGuidsCellObjectGuidsMap
 
typedef UNORDERED_MAP< uint32, CellObjectGuidsMapMapObjectGuids
 
typedef UNORDERED_MAP< uint64, time_t > RespawnTimes
 
typedef std::map< uint32, uint32CreatureLinkedRespawnMap
 
typedef UNORDERED_MAP< uint32, CreatureDataCreatureDataMap
 
typedef UNORDERED_MAP< uint32, GameObjectDataGameObjectDataMap
 
typedef UNORDERED_MAP< uint32, CreatureLocaleCreatureLocaleMap
 
typedef UNORDERED_MAP< uint32, GameObjectLocaleGameObjectLocaleMap
 
typedef UNORDERED_MAP< uint32, ItemLocaleItemLocaleMap
 
typedef UNORDERED_MAP< uint32, QuestLocaleQuestLocaleMap
 
typedef UNORDERED_MAP< uint32, NpcTextLocaleNpcTextLocaleMap
 
typedef UNORDERED_MAP< uint32, PageTextLocalePageTextLocaleMap
 
typedef UNORDERED_MAP< uint32, OregonStringLocaleOregonStringLocaleMap
 
typedef UNORDERED_MAP< uint32, GossipMenuItemsLocaleGossipMenuItemsLocaleMap
 
typedef std::multimap< uint32, uint32QuestRelations
 
typedef std::multimap< uint32, GossipMenusGossipMenusMap
 
typedef std::pair< GossipMenusMap::const_iterator, GossipMenusMap::const_iterator > GossipMenusMapBounds
 
typedef std::pair< GossipMenusMap::iterator, GossipMenusMap::iterator > GossipMenusMapBoundsNonConst
 
typedef std::multimap< uint32, GossipMenuItemsGossipMenuItemsMap
 
typedef std::pair< GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator > GossipMenuItemsMapBounds
 
typedef std::pair< GossipMenuItemsMap::iterator, GossipMenuItemsMap::iterator > GossipMenuItemsMapBoundsNonConst
 
typedef std::map< TempSummonGroupKey, std::vector< TempSummonData > > TempSummonDataContainer
 
typedef std::multimap< uint32, GraveYardDataGraveYardMap
 
typedef UNORDERED_MAP< uint32, uint32CacheNpcTextIdMap
 
typedef UNORDERED_MAP< uint32, VendorItemDataCacheVendorItemMap
 
typedef UNORDERED_MAP< uint32, TrainerSpellDataCacheTrainerSpellMap
 

Enumerations

enum  ScriptsType {
  SCRIPTS_FIRST = 1, SCRIPTS_QUEST_END = SCRIPTS_FIRST, SCRIPTS_QUEST_START, SCRIPTS_SPELL,
  SCRIPTS_GAMEOBJECT, SCRIPTS_EVENT, SCRIPTS_WAYPOINT, SCRIPTS_GOSSIP,
  SCRIPTS_LAST
}
 
enum  eScriptFlags {
  SF_TALK_USE_PLAYER = 0x1, SF_EMOTE_USE_STATE = 0x1, SF_TELEPORT_USE_CREATURE = 0x1, SF_KILLCREDIT_REWARD_GROUP = 0x1,
  SF_REMOVEAURA_REVERSE = 0x1, SF_CASTSPELL_SOURCE_TO_TARGET = 0, SF_CASTSPELL_SOURCE_TO_SOURCE = 1, SF_CASTSPELL_TARGET_TO_TARGET = 2,
  SF_CASTSPELL_TARGET_TO_SOURCE = 3, SF_CASTSPELL_SEARCH_CREATURE = 4, SF_CASTSPELL_TRIGGERED = 0x1, SF_PLAYSOUND_TARGET_PLAYER = 0x1,
  SF_PLAYSOUND_DISTANCE_SOUND = 0x2, SF_ORIENTATION_FACE_TARGET = 0x1
}
 
enum  SkillRangeType {
  SKILL_RANGE_LANGUAGE, SKILL_RANGE_LEVEL, SKILL_RANGE_MONO, SKILL_RANGE_RANK,
  SKILL_RANGE_NONE
}
 

Functions

std::string GetScriptsTableNameByType (ScriptsType type)
 
ScriptMapMapGetScriptsMapByType (ScriptsType type)
 
std::string GetScriptCommandName (ScriptCommands command)
 
SkillRangeType GetSkillRangeType (SkillLineEntry const *pSkill, bool racial)
 
bool normalizePlayerName (std::string &name)
 
LanguageDesc const * GetLanguageDescByID (uint32 lang)
 
bool LoadOregonStrings (DatabaseType &db, char const *table, int32 start_value=MAX_CREATURE_AI_TEXT_STRING_ID, int32 end_value=std::numeric_limits< int32 >::min())
 
uint32 GetAreaTriggerScriptId (uint32 trigger_id)
 
uint32 GetScriptId (const char *name)
 
ObjectMgr::ScriptNameMapGetScriptNames ()
 
GameObjectInfo const * GetGameObjectInfo (uint32 id)
 
CreatureInfo const * GetCreatureTemplate (uint32 id)
 
CreatureInfo const * GetCreatureTemplateStore (uint32 entry)
 
Quest const * GetQuestTemplateStore (uint32 entry)
 

Variables

SQLStorage sCreatureStorage
 
SQLStorage sCreatureDataAddonStorage
 
SQLStorage sCreatureInfoAddonStorage
 
SQLStorage sCreatureModelStorage
 
SQLStorage sEquipmentStorage
 
SQLStorage sEquipmentStorageRaw
 
SQLStorage sGOStorage
 
SQLStorage sPageTextStore
 
SQLStorage sItemStorage
 
SQLStorage sInstanceTemplate
 
ScriptMapMap sQuestEndScripts
 
ScriptMapMap sQuestStartScripts
 
ScriptMapMap sSpellScripts
 
ScriptMapMap sGameObjectScripts
 
ScriptMapMap sEventScripts
 
ScriptMapMap sGossipScripts
 
ScriptMapMap sWaypointScripts
 
LanguageDesc lang_description [LANGUAGES_COUNT]
 

Macro Definition Documentation

#define MAX_CREATURE_AI_TEXT_STRING_ID   (-1000000)
#define MAX_DB_SCRIPT_STRING_ID   2000010000
#define MAX_INTERNAL_PLAYER_NAME   15

Definition at line 498 of file ObjectMgr.h.

Referenced by normalizePlayerName().

#define MAX_OREGON_STRING_ID   2000000000

Definition at line 367 of file ObjectMgr.h.

Referenced by ObjectMgr::LoadOregonStrings().

#define MAX_PLAYER_NAME   12

Definition at line 497 of file ObjectMgr.h.

Referenced by ObjectMgr::IsValidName().

#define MIN_CREATURE_AI_TEXT_STRING_ID   (-1)
#define MIN_DB_SCRIPT_STRING_ID   MAX_OREGON_STRING_ID

Definition at line 368 of file ObjectMgr.h.

Referenced by ObjectMgr::LoadDbScriptStrings(), and ObjectMgr::LoadScripts().

#define MIN_OREGON_STRING_ID   1

Definition at line 366 of file ObjectMgr.h.

Referenced by ObjectMgr::LoadOregonStrings().

#define sObjectMgr   Oregon::Singleton<ObjectMgr>::Instance()

Definition at line 1285 of file ObjectMgr.h.

Referenced by Group::_addMember(), Player::_ApplyAmmoBonuses(), Object::_BuildValuesUpdate(), Player::_CanStoreItem(), Player::_CanTakeMoreSimilarItems(), Player::_LoadArenaTeamInfo(), Player::_LoadDailyQuestStatus(), Player::_LoadGroup(), Player::_LoadHomeBind(), Player::_LoadInventory(), Player::_LoadMailedItems(), Player::_LoadQuestStatus(), BattlegroundAB::_NodeDeOccupied(), Group::_removeMember(), InstanceSaveManager::_ResetInstance(), InstanceSaveManager::_ResetOrWarnAll(), Group::_setLeader(), Player::ActivateTaxiPathTo(), GameObject::ActivateToQuest(), BattlegroundAV::AddAVCreature(), ObjectAccessor::AddCorpse(), OPvPCapturePoint::AddCre(), OPvPCapturePoint::AddCreature(), Battleground::AddCreature(), OPvPCapturePoint::AddGO(), Loot::AddItem(), ArenaTeam::AddMember(), Group::AddMember(), Guild::AddMember(), QuestMenu::AddMenuItem(), AuctionHouseBot::addNewAuctionBuyerBotBid(), AuctionHouseBot::addNewAuctions(), OPvPCapturePoint::AddObject(), Battleground::AddObject(), BattlegroundQueue::AddPlayer(), Battleground::AddPlayerToResurrectQueue(), ConditionMgr::addToGossipMenuItems(), ConditionMgr::addToGossipMenus(), World::AddWeather(), LootItem::AllowedForPlayer(), Channel::Announce(), Battleground::Announce(), BattlegroundQueue::BGEndedRemoveInvites(), Group::BroadcastGroupUpdate(), ArenaTeam::BroadcastPacket(), Player::BuildEnumData(), AuctionHouseObject::BuildListAuctionItems(), WorldSession::BuildPartyMemberStatsChangedPacket(), BattlegroundMgr::BuildPvpLogDataPacket(), Player::BuyItemFromVendor(), Player::CanCompleteQuest(), Player::CanEquipItem(), Creature::CanInteractWithBattleMaster(), InstanceMap::CannotEnter(), Player::CanShareQuest(), Player::CanUseAmmo(), Player::CastedCreatureOrGO(), Battleground::CastSpellOnTeam(), PoolMgr::ChangeDailyQuests(), GameEventMgr::ChangeEquipOrModel(), Group::ChangeLeader(), Group::ChangeMembersGroup(), Guild::ChangeRank(), OPvPCapturePointHP::ChangeState(), OPvPCapturePointTF::ChangeState(), OPvPCapturePointEP::ChangeState(), OPvPCapturePointZM_Beacon::ChangeState(), Player::CheckAreaExploreAndOutdoor(), Spell::CheckCast(), Transport::CheckForEvent(), Guild::CheckGuildStructure(), Spell::CheckItems(), DisableMgr::CheckQuestDisables(), BattlegroundEY::CheckSomeoneJoinedPoint(), BattlegroundEY::CheckSomeoneLeftPoint(), Unit::ClearComboPointHolders(), Player::CompleteQuest(), Player::ContinueTaxiFlight(), SQLCreatureLoader::convert_from_str(), SQLItemLoader::convert_from_str(), SQLInstanceLoader::convert_from_str(), SQLGameObjectLoader::convert_from_str(), Group::CountTheRoll(), Transport::Create(), Bag::Create(), ArenaTeam::Create(), Group::Create(), Item::Create(), Guild::Create(), Creature::Create(), GameObject::Create(), Player::Create(), Pet::CreateBaseAtCreature(), Player::CreateCorpse(), Guild::CreateDefaultGuildRanks(), Creature::CreateFromProto(), MapInstanced::CreateInstance(), InstanceMap::CreateInstanceData(), Item::CreateItem(), Unit::CreateTamedPetFrom(), AuctionHouseBot::DecrementItemCounts(), OPvPCapturePoint::DelCapturePoint(), OPvPCapturePoint::DelCreature(), GameObject::DeleteFromDB(), Creature::DeleteFromDB(), Player::DeleteFromDB(), ArenaTeam::DelMember(), Guild::DelMember(), OPvPCapturePoint::DelObject(), PoolGroup< Creature >::Despawn1Object(), PoolGroup< GameObject >::Despawn1Object(), PoolGroup< Quest >::Despawn1Object(), ArenaTeam::Disband(), Group::Disband(), Guild::Disband(), BattlegroundMgr::DistributeArenaPoints(), Spell::DoCreateItem(), Player::DurabilityRepair(), Spell::EffectAddFarsight(), Spell::EffectDuel(), Spell::EffectPersistentAA(), Spell::EffectSummonFriend(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectTransmitted(), Battleground::EndBattleground(), BattlegroundAV::EventPlayerAssaultsPoint(), BGQueueInviteEvent::Execute(), BGQueueRemoveEvent::Execute(), ChatHandler::extractGameTeleFromLink(), OPvPCapturePointNA::FactionTakeOver(), Player::FailQuest(), Loot::FillLoot(), Guild::FillPlayerData(), Spell::FillTargetMap(), ArenaTeam::FinishGame(), GameEventMgr::GameEventSpawn(), GameEventMgr::GameEventUnspawn(), GenerateEnchSuffixFactor(), Creature::GetAIName(), Battleground::GetAlivePlayersCountByTeam(), GetAreaTriggerScriptId(), Battleground::GetClosestGraveYard(), GetCreatureTemplate(), PlayerTaxi::GetCurrentTaxiPath(), WorldSession::getDialogStatus(), SocialMgr::GetFriendInfo(), GetGameObjectInfo(), TicketMgr::GetGMTicketByName(), Player::GetGossipTextId(), GetInstanceAI(), Player::GetItemOrItemWithGemEquipped(), Creature::GetLinkedCreatureRespawnTime(), Creature::GetLinkedRespawnCreatureData(), Creature::GetLootRecipientGroup(), Player::GetMaxPersonalArenaRatingRequirement(), GameObject::GetNameForLocaleIdx(), Creature::GetNameForLocaleIdx(), Player::GetNextQuest(), ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(), WorldSession::GetOregonString(), CliHandler::GetOregonString(), Battleground::GetOregonString(), Item::GetOwner(), ChatHandler::GetPlayerGroupAndGUIDByName(), Item::GetProto(), Player::GetQuestRewardStatus(), GetQuestTemplateStore(), Player::GetReferFriendXPMultiplier(), Player::GetReqKillOrCastCurrentCount(), Creature::GetRespawnPosition(), GetScriptId(), Creature::GetScriptName(), GetScriptNames(), ChatHandler::getSelectedPlayer(), Player::GetStartPosition(), InstanceSave::GetTemplate(), Creature::GetTrainerSpells(), Creature::GetVendorItemCurrentCount(), Creature::GetVendorItems(), Player::GiveLevel(), Group::GroupLoot(), WorldSession::HandleAcceptGrantLevel(), ChatHandler::HandleActivateObjectCommand(), ChatHandler::HandleAddItemCommand(), ChatHandler::HandleAddQuest(), ChatHandler::HandleAddTeleCommand(), ChatHandler::HandleAddVendorItemCommand(), OutdoorPvPSI::HandleAreaTrigger(), WorldSession::HandleAreaTriggerOpcode(), WorldSession::HandleArenaTeamAddMemberOpcode(), WorldSession::HandleArenaTeamDisbandOpcode(), WorldSession::HandleArenaTeamInviteAcceptOpcode(), WorldSession::HandleArenaTeamLeaveOpcode(), WorldSession::HandleArenaTeamPromoteToCaptainOpcode(), WorldSession::HandleArenaTeamQueryOpcode(), WorldSession::HandleArenaTeamRemoveFromTeamOpcode(), WorldSession::HandleArenaTeamRosterOpcode(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionSellItem(), Aura::HandleAuraMounted(), Aura::HandleAuraTransform(), ChatHandler::HandleBanInfoCharacterCommand(), WorldSession::HandleBattlegroundArenaJoin(), WorldSession::HandleBattlegroundHelloOpcode(), WorldSession::HandleBattlegroundPlayerPortOpcode(), WorldSession::HandleBattlegroundPlayerPositionsOpcode(), WorldSession::HandleBattlegroundReportAFK(), WorldSession::HandleChangePlayerNameOpcode(), ChatHandler::HandleCharacterDeletedRestoreHelper(), ChatHandler::HandleCharacterEraseCommand(), ChatHandler::HandleCharacterRenameCommand(), WorldSession::HandleCharCreateOpcode(), WorldSession::HandleCharDeleteOpcode(), WorldSession::HandleChatIgnoredOpcode(), ChatHandler::HandleCombatStopCommand(), ChatHandler::HandleCompleteQuest(), ChatHandler::HandleCreatePetCommand(), WorldSession::HandleCreatureQueryOpcode(), WorldSession::HandleDeclinedPlayerNameOpcode(), ChatHandler::HandleDelObjectCommand(), ChatHandler::HandleDelTeleCommand(), ChatHandler::HandleDelVendorItemCommand(), OutdoorPvPSI::HandleDropFlag(), ChatHandler::HandleFreezeCommand(), ChatHandler::HandleGameObjectCommand(), WorldSession::HandleGameObjectQueryOpcode(), ChatHandler::HandleGMTicketAssignToCommand(), ChatHandler::HandleGMTicketCloseByIdCommand(), ChatHandler::HandleGMTicketCommentCommand(), ChatHandler::HandleGMTicketDeleteByIdCommand(), ChatHandler::HandleGMTicketGetByIdCommand(), ChatHandler::HandleGMTicketGetByNameCommand(), ChatHandler::HandleGMTicketListClosedCommand(), ChatHandler::HandleGMTicketListCommand(), ChatHandler::HandleGMTicketListOnlineCommand(), ChatHandler::HandleGMTicketUnAssignCommand(), ChatHandler::HandleGonameCommand(), ChatHandler::HandleGoObjectCommand(), ChatHandler::HandleGPSCommand(), WorldSession::HandleGrantLevel(), WorldSession::HandleGroupAcceptOpcode(), WorldSession::HandleGroupChangeSubGroupOpcode(), WorldSession::HandleGroupDeclineOpcode(), ChatHandler::HandleGroupgoCommand(), WorldSession::HandleGroupInviteOpcode(), WorldSession::HandleGroupSetLeaderOpcode(), WorldSession::HandleGuildAcceptOpcode(), WorldSession::HandleGuildAddRankOpcode(), WorldSession::HandleGuildBankBuyTab(), WorldSession::HandleGuildBankDeposit(), WorldSession::HandleGuildBankDepositItem(), WorldSession::HandleGuildBankGetMoneyAmount(), WorldSession::HandleGuildBankGetRights(), WorldSession::HandleGuildBankLog(), WorldSession::HandleGuildBankModifyTab(), WorldSession::HandleGuildBankQuery(), WorldSession::HandleGuildBankSetTabText(), WorldSession::HandleGuildBankTabColon(), WorldSession::HandleGuildBankTabText(), WorldSession::HandleGuildBankWithdraw(), WorldSession::HandleGuildChangeInfoOpcode(), ChatHandler::HandleGuildCreateCommand(), WorldSession::HandleGuildCreateOpcode(), ChatHandler::HandleGuildDeleteCommand(), WorldSession::HandleGuildDelRankOpcode(), WorldSession::HandleGuildDemoteOpcode(), WorldSession::HandleGuildDisbandOpcode(), WorldSession::HandleGuildEventLogOpcode(), WorldSession::HandleGuildInfoOpcode(), ChatHandler::HandleGuildInviteCommand(), WorldSession::HandleGuildInviteOpcode(), WorldSession::HandleGuildLeaderOpcode(), WorldSession::HandleGuildLeaveOpcode(), WorldSession::HandleGuildMOTDOpcode(), WorldSession::HandleGuildPromoteOpcode(), WorldSession::HandleGuildQueryOpcode(), ChatHandler::HandleGuildRankCommand(), WorldSession::HandleGuildRankOpcode(), WorldSession::HandleGuildRemoveOpcode(), WorldSession::HandleGuildRosterOpcode(), WorldSession::HandleGuildSaveEmblemOpcode(), WorldSession::HandleGuildSetOfficerNoteOpcode(), WorldSession::HandleGuildSetPublicNoteOpcode(), ChatHandler::HandleGuildUninviteCommand(), WorldSession::HandleInspectArenaStatsOpcode(), WorldSession::HandleInspectHonorStatsOpcode(), WorldSession::HandleInspectOpcode(), WorldSession::HandleItemNameQueryOpcode(), WorldSession::HandleItemQuerySingleOpcode(), WorldSession::HandleItemTextQuery(), ChatHandler::HandleKickPlayerCommand(), Battleground::HandleKillPlayer(), ChatHandler::HandleLearnAllDefaultCommand(), ChatHandler::HandleLevelUpCommand(), ChatHandler::HandleLinkGraveCommand(), ChatHandler::HandleListCreatureCommand(), ChatHandler::HandleListItemCommand(), ChatHandler::HandleListObjectCommand(), ChatHandler::HandleLoadPDumpCommand(), ChatHandler::HandleLookupCreatureCommand(), ChatHandler::HandleLookupItemCommand(), ChatHandler::HandleLookupObjectCommand(), ChatHandler::HandleLookupQuestCommand(), ChatHandler::HandleLookupTeleCommand(), WorldSession::HandleMailCreateTextItem(), WorldSession::HandleMessagechatOpcode(), ChatHandler::HandleMoveObjectCommand(), WorldSession::HandleMoveWorldportAckOpcode(), ChatHandler::HandleMuteCommand(), ChatHandler::HandleNamegoCommand(), WorldSession::HandleNameQueryOpcode(), ChatHandler::HandleNameTeleCommand(), ChatHandler::HandleNearGraveCommand(), ChatHandler::HandleNearObjectCommand(), ChatHandler::HandleNpcAddCommand(), ChatHandler::HandleNpcDeleteCommand(), ChatHandler::HandleNpcInfoCommand(), ChatHandler::HandleNpcMoveCommand(), ChatHandler::HandleNpcSetLinkCommand(), ChatHandler::HandleNpcSetMoveTypeCommand(), WorldSession::HandleNpcTextQueryOpcode(), ChatHandler::HandleObjectStateCommand(), OPvPCapturePointZM_GraveYard::HandleOpenGo(), WorldSession::HandlePageQueryOpcode(), WorldSession::HandlePetitionBuyOpcode(), WorldSession::HandlePetitionDeclineOpcode(), WorldSession::HandlePetitionRenameOpcode(), WorldSession::HandlePetitionSignOpcode(), WorldSession::HandlePetRename(), ChatHandler::HandlePInfoCommand(), WorldSession::HandlePlayerLogin(), WorldSession::HandleQuestComplete(), WorldSession::HandleQuestConfirmAccept(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverQuestQueryOpcode(), WorldSession::HandleQuestgiverRequestRewardOpcode(), WorldSession::HandleQuestLogRemoveQuest(), WorldSession::HandleQuestPushToParty(), WorldSession::HandleQuestQueryOpcode(), ChatHandler::HandleRAFGrantLevelCommand(), ChatHandler::HandleRAFInfoCommand(), ChatHandler::HandleRAFLinkCommand(), ChatHandler::HandleRAFReloadCommand(), ChatHandler::HandleRAFUnlinkCommand(), ChatHandler::HandleRecallCommand(), ChatHandler::HandleReloadAccessRequirementCommand(), ChatHandler::HandleReloadAllQuestCommand(), ChatHandler::HandleReloadAreaTriggerTavernCommand(), ChatHandler::HandleReloadAreaTriggerTeleportCommand(), ChatHandler::HandleReloadCreatureLinkedRespawnCommand(), ChatHandler::HandleReloadCreatureQuestInvRelationsCommand(), ChatHandler::HandleReloadCreatureQuestRelationsCommand(), ChatHandler::HandleReloadDbScriptStringCommand(), ChatHandler::HandleReloadEventScriptsCommand(), ChatHandler::HandleReloadGameGraveyardZoneCommand(), ChatHandler::HandleReloadGameObjectScriptsCommand(), ChatHandler::HandleReloadGameTeleCommand(), ChatHandler::HandleReloadGOQuestInvRelationsCommand(), ChatHandler::HandleReloadGOQuestRelationsCommand(), ChatHandler::HandleReloadGossipMenuCommand(), ChatHandler::HandleReloadGossipMenuOptionCommand(), ChatHandler::HandleReloadLocalesCreatureCommand(), ChatHandler::HandleReloadLocalesGameobjectCommand(), ChatHandler::HandleReloadLocalesItemCommand(), ChatHandler::HandleReloadLocalesNpcTextCommand(), ChatHandler::HandleReloadLocalesPageTextCommand(), ChatHandler::HandleReloadLocalesQuestCommand(), ChatHandler::HandleReloadNpcGossipCommand(), ChatHandler::HandleReloadNpcTrainerCommand(), ChatHandler::HandleReloadNpcVendorCommand(), ChatHandler::HandleReloadOregonStringCommand(), ChatHandler::HandleReloadPageTextsCommand(), ChatHandler::HandleReloadQuestAreaTriggersCommand(), ChatHandler::HandleReloadQuestEndScriptsCommand(), ChatHandler::HandleReloadQuestStartScriptsCommand(), ChatHandler::HandleReloadQuestTemplateCommand(), ChatHandler::HandleReloadReputationSpilloverTemplateCommand(), ChatHandler::HandleReloadReservedNameCommand(), ChatHandler::HandleReloadSkillFishingBaseLevelCommand(), ChatHandler::HandleReloadSpellScriptsCommand(), ChatHandler::HandleReloadWpScriptsCommand(), ChatHandler::HandleRemoveQuest(), WorldSession::HandleRepairItemOpcode(), WorldSession::HandleRequestPartyMemberStatsOpcode(), ChatHandler::HandleResetHonorCommand(), ChatHandler::HandleResetLevelCommand(), ChatHandler::HandleResetSpellsCommand(), ChatHandler::HandleResetStatsCommand(), ChatHandler::HandleResetTalentsCommand(), ChatHandler::HandleReviveCommand(), ChatHandler::HandleSendItemsCommand(), WorldSession::HandleSendMail(), ChatHandler::HandleSendMailCommand(), ChatHandler::HandleSendMessageCommand(), ChatHandler::HandleSendMoneyCommand(), WorldSession::HandleTakeItem(), ChatHandler::HandleTargetObjectCommand(), WorldSession::HandleTaxiNextDestinationOpcode(), ChatHandler::HandleTempGameObjectCommand(), WorldSession::HandleTurnInPetitionOpcode(), ChatHandler::HandleTurnObjectCommand(), ChatHandler::HandleUnFreezeCommand(), ChatHandler::HandleUnmuteCommand(), WorldSession::HandleWhoisOpcode(), WorldSession::HandleWhoOpcode(), ChatHandler::HandleWpModifyCommand(), ChatHandler::HandleWpShowCommand(), ChatHandler::HandleWritePDumpCommand(), Creature::hasInvolvedQuest(), GameObject::hasInvolvedQuest(), Creature::hasQuest(), GameObject::hasQuest(), Player::HasQuestForGO(), Player::HasQuestForItem(), AHBConfig::IgnoreItemsIds(), AuctionHouseBot::IncrementItemCounts(), Creature::InitEntry(), AuctionHouseBot::Initialize(), Pet::InitPetAuras(), Pet::InitPetCreateSpells(), Guardian::InitStatsForLevel(), Player::InitStatsForLevel(), Channel::Invite(), BattlegroundQueue::InviteGroupToBG(), ConditionMgr::isConditionTypeValid(), SmartAIMgr::IsCreatureValid(), SmartAIMgr::IsEventValid(), ArenaTeam::IsFighting(), SmartAIMgr::IsGameObjectValid(), SmartAIMgr::IsQuestValid(), ConditionMgr::isSourceTypeValid(), SmartAIMgr::IsTargetValid(), SmartAIMgr::IsTextValid(), LootStoreItem::IsValid(), ChatHandler::isValidChatMessage(), MapManager::IsValidMAP(), Player::ItemAddedQuestCheck(), Player::ItemRemovedQuestCheck(), Channel::Join(), Channel::KickOrBan(), Player::KilledMonsterCredit(), Player::LearnDefaultSpells(), Player::LearnQuestRewardedSpells(), Channel::Leave(), OPvPCapturePointEP::LinkGraveYard(), Channel::List(), AuctionHouseMgr::LoadAuctionItems(), AuctionHouseMgr::LoadAuctions(), ConditionMgr::LoadConditions(), CreatureEventAIMgr::LoadCreatureEventAI_Scripts(), CreatureEventAIMgr::LoadCreatureEventAI_Texts(), FormationMgr::LoadCreatureFormations(), Creature::LoadCreatureFromDB(), PlayerDumpReader::LoadDump(), Creature::LoadEquipment(), Bag::LoadFromDB(), GameEventMgr::LoadFromDB(), PoolMgr::LoadFromDB(), Player::LoadFromDB(), GameObject::LoadGameObjectFromDB(), Group::LoadGroupFromDB(), Guild::LoadGuildBankFromDB(), LoadLootTemplates_Mail(), Group::LoadMemberFromDB(), LoadOregonStrings(), Pet::LoadPetFromDB(), PoolMgr::LoadQuestPools(), InstanceSaveManager::LoadResetTimes(), SmartAIMgr::LoadSmartAIFromDB(), PlayerTaxi::LoadTaxiDestinationsFromString(), MapManager::LoadTransports(), WorldSession::LogoutPlayer(), LootItem::LootItem(), Channel::MakeChannelOwner(), Group::MasterLoot(), Channel::Moderate(), Player::MoneyChanged(), WorldObject::MonsterWhisper(), Group::NeedBeforeGreed(), ArenaTeam::NotifyStatsChanged(), Group::OfflineReadyCheck(), Player::OnGossipSelect(), Oregon::BattlegroundChatBuilder::operator()(), OregonStringTextBuilder::operator()(), Oregon::Battleground2ChatBuilder::operator()(), Oregon::MonsterChatBuilder::operator()(), operator<<(), Channel::Password(), MapManager::PlayerCannotEnter(), Battleground::PlayerRelogin(), Battleground::PlaySoundToTeam(), Player::PrepareGossipMenu(), Player::PrepareQuestMenu(), SmartScript::ProcessAction(), CreatureEventAI::ProcessAction(), World::RemoveBanAccount(), ObjectAccessor::RemoveCorpse(), Player::RemoveFromGroup(), Group::RemoveMember(), Player::RemovePetitionsAndSigns(), BattlegroundQueue::RemovePlayer(), Battleground::RemovePlayerAtLeave(), Battleground::RemovePlayerFromResurrectQueue(), Player::RepopAtGraveyard(), GameObject::Respawn(), Creature::Respawn(), Battleground::RewardHonorToTeam(), Battleground::RewardMark(), Player::RewardReputation(), Battleground::RewardReputationToTeam(), LootStoreItem::Roll(), ArenaTeam::Roster(), Player::Satisfy(), Player::SatisfyQuestExclusiveGroup(), Player::SatisfyQuestPreviousQuest(), Creature::SaveRespawnTime(), GameObject::SaveRespawnTime(), GameObject::SaveToDB(), Creature::SaveToDB(), Channel::Say(), Map::ScriptsProcess(), Creature::SelectLevel(), WorldSession::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), WorldSession::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), WorldSession::SendExternalMails(), World::SendGMText(), PlayerMenu::SendGossipMenu(), WorldSession::SendLearnNewTaxiNode(), WorldSession::SendListInventory(), Group::SendLootAllPassed(), Group::SendLootRoll(), Group::SendLootRollWon(), Group::SendLootStartRoll(), MailDraft::SendMailTo(), Battleground::SendPacketToAll(), Battleground::SendPacketToTeam(), Player::SendPreparedQuest(), Player::SendQuestConfirmAccept(), PlayerMenu::SendQuestGiverOfferReward(), PlayerMenu::SendQuestGiverQuestDetails(), PlayerMenu::SendQuestGiverQuestList(), PlayerMenu::SendQuestGiverRequestItems(), PlayerMenu::SendQuestQueryResponse(), MailDraft::SendReturnToSender(), Battleground::SendRewardMarkByMail(), PlayerSocial::SendSocialList(), WorldSession::SendSpiritResurrect(), PlayerMenu::SendTalking(), WorldSession::SendTaxiMenu(), WorldSession::SendTaxiStatus(), Channel::SendToAll(), Channel::SendToAllButOne(), Channel::SendToOne(), Group::SendUpdate(), World::SendWorldText(), Player::SetBattlegroundEntryPoint(), OPvPCapturePointZM_GraveYard::SetBeaconState(), ArenaTeam::SetCaptain(), OPvPCapturePoint::SetCapturePointData(), Unit::SetCharmedBy(), GameObject::SetGoArtKit(), World::SetInitialWorldSettings(), Channel::SetMode(), Channel::SetOwner(), Player::SetQuestStatus(), ReputationMgr::SetReputation(), PoolGroup< Quest >::Spawn1Object(), PoolGroup< Creature >::Spawn1Object(), PoolGroup< GameObject >::Spawn1Object(), Map::SummonCreature(), WorldObject::SummonCreatureGroup(), WorldObject::SummonGameObject(), Player::SummonPet(), Player::TakeQuestSourceItem(), Player::TalkedToCreature(), Channel::UnBan(), Player::UninviteFromGroup(), OPvPCapturePointEP::UnlinkGraveYard(), InstanceMap::UnloadAll(), BattlegroundWS::Update(), Battleground::Update(), Creature::Update(), GameObject::Update(), World::Update(), GameEventMgr::UpdateEventNPCFlags(), GameEventMgr::UpdateEventNPCVendor(), GameEventMgr::UpdateEventQuests(), BattlegroundEY::UpdatePointStatuses(), Creature::UpdateVendorItemCurrentCount(), GameObject::Use(), ObjectGridLoader::Visit(), ObjectWorldLoader::Visit(), Spell::WriteAmmoToPacket(), and Battleground::YellToAll().

#define WEATHER_SEASONS   4

Definition at line 460 of file ObjectMgr.h.

Referenced by ObjectMgr::LoadWeatherZoneChances(), and Weather::ReGenerate().

Typedef Documentation

Definition at line 481 of file ObjectMgr.h.

Definition at line 483 of file ObjectMgr.h.

typedef std::map<uint32, uint32> CellCorpseSet

Definition at line 352 of file ObjectMgr.h.

typedef std::set<uint32> CellGuidSet

Definition at line 351 of file ObjectMgr.h.

Definition at line 359 of file ObjectMgr.h.

Definition at line 379 of file ObjectMgr.h.

Definition at line 378 of file ObjectMgr.h.

Definition at line 381 of file ObjectMgr.h.

Definition at line 380 of file ObjectMgr.h.

Definition at line 74 of file ObjectMgr.h.

typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsMap

Definition at line 449 of file ObjectMgr.h.

typedef std::pair<GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator> GossipMenuItemsMapBounds

Definition at line 450 of file ObjectMgr.h.

typedef std::pair<GossipMenuItemsMap::iterator, GossipMenuItemsMap::iterator> GossipMenuItemsMapBoundsNonConst

Definition at line 451 of file ObjectMgr.h.

typedef std::multimap<uint32, GossipMenus> GossipMenusMap

Definition at line 446 of file ObjectMgr.h.

typedef std::pair<GossipMenusMap::const_iterator, GossipMenusMap::const_iterator> GossipMenusMapBounds

Definition at line 447 of file ObjectMgr.h.

typedef std::pair<GossipMenusMap::iterator, GossipMenusMap::iterator> GossipMenusMapBoundsNonConst

Definition at line 448 of file ObjectMgr.h.

typedef std::multimap<uint32, GraveYardData> GraveYardMap

Definition at line 478 of file ObjectMgr.h.

Definition at line 383 of file ObjectMgr.h.

Definition at line 360 of file ObjectMgr.h.

Definition at line 385 of file ObjectMgr.h.

Definition at line 386 of file ObjectMgr.h.

Definition at line 384 of file ObjectMgr.h.

typedef std::multimap<uint32, uint32> QuestRelations

Definition at line 390 of file ObjectMgr.h.

typedef UNORDERED_MAP<uint64, time_t> RespawnTimes

Definition at line 362 of file ObjectMgr.h.

typedef std::multimap<uint32, ScriptInfo> ScriptMap

Definition at line 327 of file ObjectMgr.h.

typedef std::map<uint32, ScriptMap > ScriptMapMap

Definition at line 328 of file ObjectMgr.h.

typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer

Definition at line 453 of file ObjectMgr.h.

Enumeration Type Documentation

Enumerator
SF_TALK_USE_PLAYER 
SF_EMOTE_USE_STATE 
SF_TELEPORT_USE_CREATURE 
SF_KILLCREDIT_REWARD_GROUP 
SF_REMOVEAURA_REVERSE 
SF_CASTSPELL_SOURCE_TO_TARGET 
SF_CASTSPELL_SOURCE_TO_SOURCE 
SF_CASTSPELL_TARGET_TO_TARGET 
SF_CASTSPELL_TARGET_TO_SOURCE 
SF_CASTSPELL_SEARCH_CREATURE 
SF_CASTSPELL_TRIGGERED 
SF_PLAYSOUND_TARGET_PLAYER 
SF_PLAYSOUND_DISTANCE_SOUND 
SF_ORIENTATION_FACE_TARGET 

Definition at line 111 of file ObjectMgr.h.

112 {
113  // Talk Flags
114  SF_TALK_USE_PLAYER = 0x1,
115 
116  // Emote flags
117  SF_EMOTE_USE_STATE = 0x1,
118 
119  // TeleportTo flags
121 
122  // KillCredit flags
124 
125  // RemoveAura flags
126  SF_REMOVEAURA_REVERSE = 0x1,
127 
128  // CastSpell flags
135 
136  // PlaySound flags
139 
140  // Orientation flags
142 };
Enumerator
SCRIPTS_FIRST 
SCRIPTS_QUEST_END 
SCRIPTS_QUEST_START 
SCRIPTS_SPELL 
SCRIPTS_GAMEOBJECT 
SCRIPTS_EVENT 
SCRIPTS_WAYPOINT 
SCRIPTS_GOSSIP 
SCRIPTS_LAST 

Definition at line 96 of file ObjectMgr.h.

Enumerator
SKILL_RANGE_LANGUAGE 
SKILL_RANGE_LEVEL 
SKILL_RANGE_MONO 
SKILL_RANGE_RANK 
SKILL_RANGE_NONE 

Definition at line 486 of file ObjectMgr.h.

487 {
488  SKILL_RANGE_LANGUAGE, // 300..300
489  SKILL_RANGE_LEVEL, // 1..max skill for level
490  SKILL_RANGE_MONO, // 1..1, grey monolite bar
491  SKILL_RANGE_RANK, // 1..skill for known rank
492  SKILL_RANGE_NONE, // 0..0 always
493 };

Function Documentation

uint32 GetAreaTriggerScriptId ( uint32  trigger_id)

Definition at line 7582 of file ObjectMgr.cpp.

References sObjectMgr.

Referenced by ScriptMgr::AreaTrigger().

7583 {
7584  return sObjectMgr.GetAreaTriggerScriptId(trigger_id);
7585 }
#define sObjectMgr
Definition: ObjectMgr.h:1285
CreatureInfo const* GetCreatureTemplateStore ( uint32  entry)

Definition at line 7620 of file ObjectMgr.cpp.

References SQLStorage::LookupEntry(), and sCreatureStorage.

Referenced by SystemMgr::LoadScriptWaypoints(), CreatureEventAI::ProcessAction(), and ScriptedAI::SetEquipmentSlots().

7621 {
7622  return sCreatureStorage.LookupEntry<CreatureInfo>(entry);
7623 }
SQLStorage sCreatureStorage
T const * LookupEntry(uint32 id) const
Definition: SQLStorage.h:52
GameObjectInfo const* GetGameObjectInfo ( uint32  id)
LanguageDesc const* GetLanguageDescByID ( uint32  lang)

Definition at line 269 of file ObjectMgr.cpp.

References LANGUAGES_COUNT.

Referenced by WorldSession::HandleMessagechatOpcode(), CreatureEventAIMgr::LoadCreatureEventAI_Texts(), CreatureTextMgr::LoadCreatureTexts(), SystemMgr::LoadScriptTexts(), and SystemMgr::LoadScriptTextsCustom().

270 {
271  for (uint8 i = 0; i < LANGUAGES_COUNT; ++i)
272  {
273  if (uint32(lang_description[i].lang_id) == lang)
274  return &lang_description[i];
275  }
276 
277  return NULL;
278 }
ACE_UINT8 uint8
Definition: Define.h:73
#define LANGUAGES_COUNT
LanguageDesc lang_description[LANGUAGES_COUNT]
Definition: ObjectMgr.cpp:246
ACE_UINT32 uint32
Definition: Define.h:71
Quest const* GetQuestTemplateStore ( uint32  entry)

Definition at line 7625 of file ObjectMgr.cpp.

References sObjectMgr.

7626 {
7627  return sObjectMgr.GetQuestTemplate(entry);
7628 }
#define sObjectMgr
Definition: ObjectMgr.h:1285
std::string GetScriptCommandName ( ScriptCommands  command)

Definition at line 120 of file ObjectMgr.cpp.

References SCRIPT_COMMAND_ACTIVATE_OBJECT, SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT, SCRIPT_COMMAND_CAST_SPELL, SCRIPT_COMMAND_CLOSE_DOOR, SCRIPT_COMMAND_CLOSE_GOSSIP, SCRIPT_COMMAND_CREATE_ITEM, SCRIPT_COMMAND_DESPAWN_SELF, SCRIPT_COMMAND_DO_NOTHING, SCRIPT_COMMAND_EMOTE, SCRIPT_COMMAND_EQUIP, SCRIPT_COMMAND_FIELD_SET, SCRIPT_COMMAND_FLAG_REMOVE, SCRIPT_COMMAND_FLAG_SET, SCRIPT_COMMAND_KILL, SCRIPT_COMMAND_KILL_CREDIT, SCRIPT_COMMAND_LOAD_PATH, SCRIPT_COMMAND_MODEL, SCRIPT_COMMAND_MOVE_TO, SCRIPT_COMMAND_OPEN_DOOR, SCRIPT_COMMAND_ORIENTATION, SCRIPT_COMMAND_PLAY_SOUND, SCRIPT_COMMAND_QUEST_EXPLORED, SCRIPT_COMMAND_REMOVE_AURA, SCRIPT_COMMAND_RESPAWN_GAMEOBJECT, SCRIPT_COMMAND_TALK, SCRIPT_COMMAND_TELEPORT_TO, and SCRIPT_COMMAND_TEMP_SUMMON_CREATURE.

Referenced by ScriptInfo::GetDebugInfo(), ObjectMgr::LoadScripts(), and Map::ScriptsProcess().

121 {
122  std::string res = "";
123  switch (command)
124  {
125  case SCRIPT_COMMAND_TALK:
126  res = "SCRIPT_COMMAND_TALK";
127  break;
129  res = "SCRIPT_COMMAND_EMOTE";
130  break;
132  res = "SCRIPT_COMMAND_FIELD_SET";
133  break;
135  res = "SCRIPT_COMMAND_MOVE_TO";
136  break;
138  res = "SCRIPT_COMMAND_FLAG_SET";
139  break;
141  res = "SCRIPT_COMMAND_FLAG_REMOVE";
142  break;
144  res = "SCRIPT_COMMAND_TELEPORT_TO";
145  break;
147  res = "SCRIPT_COMMAND_QUEST_EXPLORED";
148  break;
150  res = "SCRIPT_COMMAND_KILL_CREDIT";
151  break;
153  res = "SCRIPT_COMMAND_RESPAWN_GAMEOBJECT";
154  break;
156  res = "SCRIPT_COMMAND_TEMP_SUMMON_CREATURE";
157  break;
159  res = "SCRIPT_COMMAND_OPEN_DOOR";
160  break;
162  res = "SCRIPT_COMMAND_CLOSE_DOOR";
163  break;
165  res = "SCRIPT_COMMAND_ACTIVATE_OBJECT";
166  break;
168  res = "SCRIPT_COMMAND_REMOVE_AURA";
169  break;
171  res = "SCRIPT_COMMAND_CAST_SPELL";
172  break;
174  res = "SCRIPT_COMMAND_PLAY_SOUND";
175  break;
177  res = "SCRIPT_COMMAND_CREATE_ITEM";
178  break;
180  res = "SCRIPT_COMMAND_DESPAWN_SELF";
181  break;
183  res = "SCRIPT_COMMAND_DO_NOTHING";
184  break;
186  res = "SCRIPT_COMMAND_LOAD_PATH";
187  break;
189  res = "SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT";
190  break;
191  case SCRIPT_COMMAND_KILL:
192  res = "SCRIPT_COMMAND_KILL";
193  break;
194  // Oregon only
196  res = "SCRIPT_COMMAND_ORIENTATION";
197  break;
199  res = "SCRIPT_COMMAND_EQUIP";
200  break;
202  res = "SCRIPT_COMMAND_MODEL";
203  break;
205  res = "SCRIPT_COMMAND_CLOSE_GOSSIP";
206  break;
207  default:
208  {
209  char sz[32];
210  sprintf(sz, "Unknown command: %d", command);
211  res = sz;
212  break;
213  }
214  }
215  return res;
216 }
ObjectMgr::ScriptNameMap& GetScriptNames ( )

Definition at line 7605 of file ObjectMgr.cpp.

References sObjectMgr.

7606 {
7607  return sObjectMgr.GetScriptNames();
7608 }
#define sObjectMgr
Definition: ObjectMgr.h:1285
ScriptMapMap* GetScriptsMapByType ( ScriptsType  type)

Definition at line 88 of file ObjectMgr.cpp.

References SCRIPTS_EVENT, SCRIPTS_GAMEOBJECT, SCRIPTS_GOSSIP, SCRIPTS_QUEST_END, SCRIPTS_QUEST_START, SCRIPTS_SPELL, SCRIPTS_WAYPOINT, sEventScripts, sGameObjectScripts, sGossipScripts, sQuestEndScripts, sQuestStartScripts, sSpellScripts, and sWaypointScripts.

Referenced by ObjectMgr::CheckScripts(), ObjectMgr::LoadScripts(), and Map::ScriptsProcess().

89 {
90  ScriptMapMap* res = NULL;
91  switch (type)
92  {
93  case SCRIPTS_QUEST_END:
94  res = &sQuestEndScripts;
95  break;
97  res = &sQuestStartScripts;
98  break;
99  case SCRIPTS_SPELL:
100  res = &sSpellScripts;
101  break;
102  case SCRIPTS_GAMEOBJECT:
103  res = &sGameObjectScripts;
104  break;
105  case SCRIPTS_EVENT:
106  res = &sEventScripts;
107  break;
108  case SCRIPTS_WAYPOINT:
109  res = &sWaypointScripts;
110  break;
111  case SCRIPTS_GOSSIP:
112  res = &sGossipScripts;
113  break;
114  default:
115  break;
116  }
117  return res;
118 }
ScriptMapMap sSpellScripts
Definition: ObjectMgr.cpp:50
std::map< uint32, ScriptMap > ScriptMapMap
Definition: ObjectMgr.h:328
ScriptMapMap sQuestEndScripts
Definition: ObjectMgr.cpp:48
ScriptMapMap sGossipScripts
Definition: ObjectMgr.cpp:53
ScriptMapMap sQuestStartScripts
Definition: ObjectMgr.cpp:49
ScriptMapMap sGameObjectScripts
Definition: ObjectMgr.cpp:51
ScriptMapMap sEventScripts
Definition: ObjectMgr.cpp:52
ScriptMapMap sWaypointScripts
Definition: ObjectMgr.cpp:54
std::string GetScriptsTableNameByType ( ScriptsType  type)

Definition at line 56 of file ObjectMgr.cpp.

References SCRIPTS_EVENT, SCRIPTS_GAMEOBJECT, SCRIPTS_GOSSIP, SCRIPTS_QUEST_END, SCRIPTS_QUEST_START, SCRIPTS_SPELL, and SCRIPTS_WAYPOINT.

Referenced by ScriptInfo::GetDebugInfo(), ObjectMgr::LoadScripts(), and Map::ScriptsProcess().

57 {
58  std::string res = "";
59  switch (type)
60  {
61  case SCRIPTS_QUEST_END:
62  res = "quest_end_scripts";
63  break;
65  res = "quest_start_scripts";
66  break;
67  case SCRIPTS_SPELL:
68  res = "spell_scripts";
69  break;
70  case SCRIPTS_GAMEOBJECT:
71  res = "gameobject_scripts";
72  break;
73  case SCRIPTS_EVENT:
74  res = "event_scripts";
75  break;
76  case SCRIPTS_WAYPOINT:
77  res = "waypoint_scripts";
78  break;
79  case SCRIPTS_GOSSIP:
80  res = "gossip_scripts";
81  break;
82  default:
83  break;
84  }
85  return res;
86 }
SkillRangeType GetSkillRangeType ( SkillLineEntry const *  pSkill,
bool  racial 
)

Definition at line 6928 of file ObjectMgr.cpp.

References SkillLineEntry::categoryId, SkillLineEntry::id, IsProfessionSkill(), SKILL_CATEGORY_ARMOR, SKILL_CATEGORY_ATTRIBUTES, SKILL_CATEGORY_CLASS, SKILL_CATEGORY_LANGUAGES, SKILL_CATEGORY_NOT_DISPLAYED, SKILL_CATEGORY_PROFESSION, SKILL_CATEGORY_SECONDARY, SKILL_CATEGORY_WEAPON, SKILL_FIST_WEAPONS, SKILL_LOCKPICKING, SKILL_POISONS, SKILL_RANGE_LANGUAGE, SKILL_RANGE_LEVEL, SKILL_RANGE_MONO, SKILL_RANGE_NONE, and SKILL_RANGE_RANK.

Referenced by Player::_LoadSkills(), Player::AddSpell(), and Player::UpdateSkillsForLevel().

6929 {
6930  switch (pSkill->categoryId)
6931  {
6933  return SKILL_RANGE_LANGUAGE;
6934  case SKILL_CATEGORY_WEAPON:
6935  if (pSkill->id != SKILL_FIST_WEAPONS)
6936  return SKILL_RANGE_LEVEL;
6937  else
6938  return SKILL_RANGE_MONO;
6939  case SKILL_CATEGORY_ARMOR:
6940  case SKILL_CATEGORY_CLASS:
6941  if (pSkill->id != SKILL_POISONS && pSkill->id != SKILL_LOCKPICKING)
6942  return SKILL_RANGE_MONO;
6943  else
6944  return SKILL_RANGE_LEVEL;
6947  // not set skills for professions and racial abilities
6948  if (IsProfessionSkill(pSkill->id))
6949  return SKILL_RANGE_RANK;
6950  else if (racial)
6951  return SKILL_RANGE_NONE;
6952  else
6953  return SKILL_RANGE_MONO;
6954  default:
6955  case SKILL_CATEGORY_ATTRIBUTES: //not found in dbc
6956  case SKILL_CATEGORY_NOT_DISPLAYED: //only GENEREC(DND)
6957  return SKILL_RANGE_NONE;
6958  }
6959 }
bool IsProfessionSkill(uint32 skill)
Definition: SpellMgr.h:825
bool LoadOregonStrings ( DatabaseType db,
char const *  table,
int32  start_value = MAX_CREATURE_AI_TEXT_STRING_ID,
int32  end_value = std::numeric_limits< int32 >::min() 
)

Definition at line 7587 of file ObjectMgr.cpp.

References MAX_DB_SCRIPT_STRING_ID, sLog, and sObjectMgr.

Referenced by ObjectMgr::LoadDbScriptStrings(), ObjectMgr::LoadOregonStrings(), SystemMgr::LoadScriptTexts(), and SystemMgr::LoadScriptTextsCustom().

7588 {
7589  // MAX_DB_SCRIPT_STRING_ID is max allowed negative value for scripts (scrpts can use only more deep negative values
7590  // start/end reversed for negative values
7591  if (start_value > MAX_DB_SCRIPT_STRING_ID || end_value >= start_value)
7592  {
7593  sLog.outErrorDb("Table '%s' attempt loaded with reserved by core range (%d - %d), strings not loaded.", table, start_value, end_value + 1);
7594  return false;
7595  }
7596 
7597  return sObjectMgr.LoadOregonStrings(db, table, start_value, end_value);
7598 }
#define sLog
Log class singleton.
Definition: Log.h:187
#define sObjectMgr
Definition: ObjectMgr.h:1285
const AuthHandler table[]
Definition: AuthSocket.cpp:149
#define MAX_DB_SCRIPT_STRING_ID
Definition: ObjectMgr.h:369
bool normalizePlayerName ( std::string &  name)

Definition at line 225 of file ObjectMgr.cpp.

References MAX_INTERNAL_PLAYER_NAME, Utf8toWStr(), wcharToLower(), wcharToUpper(), and WStrToUtf8().

Referenced by ChatHandler::GetDeletedCharacterInfoList(), TicketMgr::GetGMTicketByName(), ChatHandler::GetPlayerGroupAndGUIDByName(), WorldSession::HandleAddFriendOpcode(), WorldSession::HandleAddIgnoreOpcode(), WorldSession::HandleArenaTeamAddMemberOpcode(), WorldSession::HandleArenaTeamPromoteToCaptainOpcode(), WorldSession::HandleArenaTeamRemoveFromTeamOpcode(), ChatHandler::HandleBanHelper(), ChatHandler::HandleBanInfoCharacterCommand(), WorldSession::HandleChangePlayerNameOpcode(), WorldSession::HandleChannelBan(), WorldSession::HandleChannelInvite(), WorldSession::HandleChannelKick(), WorldSession::HandleChannelModerator(), WorldSession::HandleChannelMute(), WorldSession::HandleChannelSetOwner(), WorldSession::HandleChannelUnban(), WorldSession::HandleChannelUnmoderator(), WorldSession::HandleChannelUnmute(), ChatHandler::HandleCharacterDeletedRestoreCommand(), ChatHandler::HandleCharacterEraseCommand(), ChatHandler::HandleCharacterRenameCommand(), WorldSession::HandleCharCreateOpcode(), ChatHandler::HandleCombatStopCommand(), WorldSession::HandleDeclinedPlayerNameOpcode(), ChatHandler::HandleFreezeCommand(), ChatHandler::HandleGMTicketAssignToCommand(), ChatHandler::HandleGonameCommand(), ChatHandler::HandleGPSCommand(), ChatHandler::HandleGroupgoCommand(), WorldSession::HandleGroupInviteOpcode(), WorldSession::HandleGroupUninviteNameOpcode(), WorldSession::HandleGuildDemoteOpcode(), ChatHandler::HandleGuildInviteCommand(), WorldSession::HandleGuildInviteOpcode(), WorldSession::HandleGuildLeaderOpcode(), WorldSession::HandleGuildPromoteOpcode(), ChatHandler::HandleGuildRankCommand(), WorldSession::HandleGuildRemoveOpcode(), WorldSession::HandleGuildSetOfficerNoteOpcode(), WorldSession::HandleGuildSetPublicNoteOpcode(), ChatHandler::HandleGuildUninviteCommand(), ChatHandler::HandleKickPlayerCommand(), ChatHandler::HandleLearnAllDefaultCommand(), ChatHandler::HandleLevelUpCommand(), ChatHandler::HandleLoadPDumpCommand(), WorldSession::HandleMessagechatOpcode(), ChatHandler::HandleMuteCommand(), ChatHandler::HandleNamegoCommand(), ChatHandler::HandleNameTeleCommand(), ChatHandler::HandlePInfoCommand(), ChatHandler::HandleRecallCommand(), ChatHandler::HandleResetHonorCommand(), ChatHandler::HandleResetLevelCommand(), ChatHandler::HandleResetSpellsCommand(), ChatHandler::HandleResetStatsCommand(), ChatHandler::HandleResetTalentsCommand(), ChatHandler::HandleReviveCommand(), ChatHandler::HandleSendItemsCommand(), WorldSession::HandleSendMail(), ChatHandler::HandleSendMailCommand(), ChatHandler::HandleSendMessageCommand(), ChatHandler::HandleSendMoneyCommand(), ChatHandler::HandleUnBanHelper(), ChatHandler::HandleUnFreezeCommand(), ChatHandler::HandleUnmuteCommand(), WorldSession::HandleWhoisOpcode(), ChatHandler::HandleWritePDumpCommand(), PlayerDumpReader::LoadDump(), and ObjectMgr::LoadReservedPlayersNames().

226 {
227  if (name.empty())
228  return false;
229 
230  wchar_t wstr_buf[MAX_INTERNAL_PLAYER_NAME + 1];
231  size_t wstr_len = MAX_INTERNAL_PLAYER_NAME;
232 
233  if (!Utf8toWStr(name, &wstr_buf[0], wstr_len))
234  return false;
235 
236  wstr_buf[0] = wcharToUpper(wstr_buf[0]);
237  for (size_t i = 1; i < wstr_len; ++i)
238  wstr_buf[i] = wcharToLower(wstr_buf[i]);
239 
240  if (!WStrToUtf8(wstr_buf, wstr_len, name))
241  return false;
242 
243  return true;
244 }
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
Definition: Util.cpp:294
bool WStrToUtf8(wchar_t *wstr, size_t size, std::string &utf8str)
Definition: Util.cpp:338
#define MAX_INTERNAL_PLAYER_NAME
Definition: ObjectMgr.h:498
wchar_t wcharToLower(wchar_t wchar)
Definition: Util.h:286
wchar_t wcharToUpper(wchar_t wchar)
Definition: Util.h:258

Variable Documentation

LanguageDesc lang_description[LANGUAGES_COUNT]

Definition at line 246 of file ObjectMgr.cpp.

Referenced by ChatHandler::HandleLearnAllLangCommand().

SQLStorage sCreatureDataAddonStorage
SQLStorage sCreatureInfoAddonStorage
ScriptMapMap sGossipScripts
ScriptMapMap sQuestEndScripts
ScriptMapMap sQuestStartScripts
ScriptMapMap sSpellScripts