Merge commit 'origin/master' into 310

Conflicts:
	src/game/AchievementMgr.cpp
	src/game/BattleGroundHandler.cpp
	src/game/CreatureEventAIMgr.cpp
	src/game/DBCStructure.h
	src/game/Player.cpp
	src/game/Spell.cpp
	src/shared/revision_nr.h
This commit is contained in:
tomrus88 2009-04-21 15:20:45 +04:00
commit a9e148edac
45 changed files with 1119 additions and 298 deletions

View file

@ -3681,6 +3681,16 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
break;
}
case SCRIPT_COMMAND_EMOTE:
{
if(!sEmotesStore.LookupEntry(tmp.datalong))
{
sLog.outErrorDb("Table `%s` has invalid emote id (datalong = %u) in SCRIPT_COMMAND_EMOTE for script id %u",tablename,tmp.datalong,tmp.id);
continue;
}
break;
}
case SCRIPT_COMMAND_TELEPORT_TO:
{
if(!sMapStore.LookupEntry(tmp.datalong))
@ -4167,23 +4177,6 @@ void ObjectMgr::LoadInstanceTemplate()
sLog.outString();
}
bool ObjectMgr::IsGameObjectOfTypeInRange(Player *player, uint64 guid, GameobjectTypes type) const
{
if(GameObject *go = ObjectAccessor::GetGameObject(*player, guid))
{
if(go->GetGoType() == type)
{
// TODO: find out how the client calculates the maximal usage distance to spellless working
// gameobjects like guildbanks and mailboxes - 10.0 is a just an abitrary choosen number
if (go->IsWithinDistInMap(player, 10.0f))
return true;
sLog.outError("IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name,
go->GetGUIDLow(), player->GetName(), player->GetGUIDLow(), go->GetDistance(player));
}
}
return false;
}
GossipText const *ObjectMgr::GetGossipText(uint32 Text_ID) const
{
GossipTextMap::const_iterator itr = mGossipText.find(Text_ID);