*Update vehicle system. Make vehicle a seperate class from creature.
--HG-- branch : trunk
This commit is contained in:
1 parent
e71f5e474e
commit
1ee90e1022
42 files changed
+451
-579
No files matched your search
@@ -175,6 +175,13 @@ Creature *ScriptedAI::DoSummon(uint32 uiEntry, WorldObject* pGo, float fRadius,
|
||||
return me->SummonCreature(uiEntry, fX, fY, fZ, me->GetOrientation(), uiType, uiDespawntime);
|
||||
}
|
||||
|
||||
Creature *ScriptedAI::DoSummonFlyer(uint32 uiEntry, WorldObject *obj, float _fZ, float fRadius, uint32 uiDespawntime, TempSummonType uiType)
|
||||
{
|
||||
float fX, fY, fZ;
|
||||
obj->GetGroundPointAroundUnit(fX, fY, fZ, fRadius * rand_norm(), rand_norm()*2*M_PI);
|
||||
return me->SummonCreature(uiEntry, fX, fY, _fZ, me->GetOrientation(), uiType, uiDespawntime);
|
||||
}
|
||||
|
||||
|
||||
Unit* ScriptedAI::SelectUnit(SelectAggroTarget target, uint32 uiPosition)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#define CAST_PLR(a) (SCRIPT_CAST_TYPE<Player*>(a))
|
||||
#define CAST_CRE(a) (SCRIPT_CAST_TYPE<Creature*>(a))
|
||||
#define CAST_VEH(a) (SCRIPT_CAST_TYPE<Vehicle*>(a))
|
||||
#define CAST_SUM(a) (SCRIPT_CAST_TYPE<TempSummon*>(a))
|
||||
#define CAST_PET(a) (SCRIPT_CAST_TYPE<Pet*>(a))
|
||||
#define CAST_AI(a,b) (SCRIPT_CAST_TYPE<a*>(b))
|
||||
@@ -27,7 +26,7 @@
|
||||
|
||||
class ScriptedInstance;
|
||||
|
||||
class SummonList : private std::list<uint64>
|
||||
class SummonList : public std::list<uint64>
|
||||
{
|
||||
public:
|
||||
explicit SummonList(Creature* creature) : m_creature(creature) {}
|
||||
@@ -154,6 +153,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime);
|
||||
Creature *DoSummon(uint32 uiEntry, const float fPos[4], uint32 uiDespawntime = 30000, TempSummonType uiType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
Creature *DoSummon(uint32 uiEntry, WorldObject *obj, float fRadius = 5.0f, uint32 uiDespawntime = 30000, TempSummonType uiType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
Creature *DoSummonFlyer(uint32 uiEntry, WorldObject *obj, float fZ, float fRadius = 5.0f, uint32 uiDespawntime = 30000, TempSummonType uiType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
|
||||
//Selects a unit from the creature's current aggro list
|
||||
Unit* SelectUnit(SelectAggroTarget target, uint32 uiPosition);
|
||||
|
||||
Reference in new issue
Block a user