aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/include
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-28 16:27:45 -0600
committermegamage <none@none>2008-12-28 16:27:45 -0600
commit2d25493b8b847745c9bb5179c9a301e49effff65 (patch)
treec28a893338fecd94aa2cd3013508f0305b41738f /src/bindings/scripts/include
parente2ee47fb355c3ff59c54cd1bd3f2c8b329c8a108 (diff)
parent7e85d91f696e6c73fb4d94f24330fb380e725a77 (diff)
*Merge with Trinity 702.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts/include')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp8
-rw-r--r--src/bindings/scripts/include/sc_creature.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 590118e7a8c..fad8c631e5e 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -740,11 +740,11 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
}
-Unit* ScriptedAI::FindCreature(uint32 entry, uint32 range)
+Unit* ScriptedAI::FindCreature(uint32 entry, uint32 range, uint32 district)
{
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
+ cell.data.Part.reserved = district;
cell.SetNoCreate();
std::list<Creature*> NPCList;
@@ -765,11 +765,11 @@ Unit* ScriptedAI::FindCreature(uint32 entry, uint32 range)
}else error_log("SD2 ERROR: Entry: %u not found!", entry); return NULL;
}
-GameObject* ScriptedAI::FindGameObject(uint32 entry)
+GameObject* ScriptedAI::FindGameObject(uint32 entry, uint32 district)
{
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
+ cell.data.Part.reserved = district;
cell.SetNoCreate();
std::list<GameObject*> GOList;
diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h
index 1878e6e11dc..3ece26bdb6f 100644
--- a/src/bindings/scripts/include/sc_creature.h
+++ b/src/bindings/scripts/include/sc_creature.h
@@ -149,10 +149,10 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
void DoTeleportAll(float x, float y, float z, float o);
//Get a single creature of given entry
- Unit* FindCreature(uint32 entry, uint32 range);
+ Unit* FindCreature(uint32 entry, uint32 range, uint32 district = ALL_DISTRICT);
//Get a single gameobject of given entry
- GameObject* FindGameObject(uint32 entry);
+ GameObject* FindGameObject(uint32 entry, uint32 district = ALL_DISTRICT);
//Returns friendly unit with the most amount of hp missing from max hp
Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff = 1);