Merge [SD2]

r1088 Add grid searcher class PlayerAtMinimumRangeAway and create ScriptedAI function GetPlayerAtMinimumRange that return player in grid with at least the defined range away from m_creature.
r1089 Remove no longer needed grid search code and use function instead. - skip
r1090 Rename and clarify function variables - skip
r1091 Add two new grid search functions to return list of creature and gameobject. Remove unused class.
r1092 Remove more grid search code in scripts and use functions instead.
r1093 Remove obsolete grid search class and rename new to a more consistent name.
r1094 Speed up functions GetCreature/GameObjectListWithEntryInGrid a bit

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-07-24 05:27:49 +02:00
parent ff1b2ed88c
commit 607dfaf8c9
9 changed files with 104 additions and 77 deletions
+3 -1
View File
@@ -169,6 +169,9 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
//Returns a list of all friendly units missing a specific buff within range
std::list<Creature*> DoFindFriendlyMissingBuff(float range, uint32 spellid);
//Return a player with at least minimumRange from m_creature
Player* GetPlayerAtMinimumRange(float fMinimumRange);
//Spawns a creature relative to m_creature
Creature* DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime);
Creature *DoSummon(uint32 entry, const float pos[4], uint32 despawntime = 30000, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
@@ -248,6 +251,5 @@ struct TRINITY_DLL_DECL BossAI : public ScriptedAI
//return closest creature alive in grid, with range from pSource
Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 Entry, float MaxSearchRange);
#endif