aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-30 18:38:54 -0500
committermegamage <none@none>2009-08-30 18:38:54 -0500
commit3ea312cad572bca3bb3c15ad9eea7e54f7f04f07 (patch)
treed86c3447ef4da0b35a5b5e7ac943b13f0a6b6abf /src/game
parentc07707ba47d75b18b84b5602aa5224078e1b40e3 (diff)
*Update Kologarn script.
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/CreatureAIImpl.h5
-rw-r--r--src/game/UnitAI.h1
-rw-r--r--src/game/Vehicle.cpp7
3 files changed, 9 insertions, 4 deletions
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h
index 569c0fad9da..2ed0219ad6a 100644
--- a/src/game/CreatureAIImpl.h
+++ b/src/game/CreatureAIImpl.h
@@ -319,6 +319,11 @@ inline void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
me->CastSpell(victim, spellId, triggered);
}
+inline void UnitAI::DoCastVictim(uint32 spellId, bool triggered)
+{
+ me->CastSpell(me->getVictim(), spellId, triggered);
+}
+
inline void UnitAI::DoCastAOE(uint32 spellId, bool triggered)
{
if(!triggered && me->hasUnitState(UNIT_STAT_CASTING))
diff --git a/src/game/UnitAI.h b/src/game/UnitAI.h
index ba6704d897f..c5e02b07d1b 100644
--- a/src/game/UnitAI.h
+++ b/src/game/UnitAI.h
@@ -70,6 +70,7 @@ class TRINITY_DLL_SPEC UnitAI
void DoCast(uint32 spellId);
void DoCast(Unit* victim, uint32 spellId, bool triggered = false);
+ void DoCastVictim(uint32 spellId, bool triggered = false);
void DoCastAOE(uint32 spellId, bool triggered = false);
float DoGetSpellMaxRange(uint32 spellId, bool positive = false);
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp
index 853440169eb..8f6399227f4 100644
--- a/src/game/Vehicle.cpp
+++ b/src/game/Vehicle.cpp
@@ -98,7 +98,7 @@ void Vehicle::InstallAllAccessories()
case 28312:InstallAccessory(28319,7);break;
case 32627:InstallAccessory(32629,7);break;
case 32930:
- InstallAccessory(32933,2);
+ InstallAccessory(32933,0);
InstallAccessory(32934,1);
break;
case 33109:InstallAccessory(33167,1);break;
@@ -268,7 +268,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
}
- if(!(seat->second.seatInfo->m_flags & 0x4000))
+ if(seat->second.seatInfo->m_flags && !(seat->second.seatInfo->m_flags & 0x4000))
unit->addUnitState(UNIT_STAT_ONVEHICLE);
//SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
@@ -328,8 +328,7 @@ void Vehicle::RemovePassenger(Unit *unit)
++m_usableSeatNum;
}
- if(!(seat->second.seatInfo->m_flags & 0x4000))
- unit->clearUnitState(UNIT_STAT_ONVEHICLE);
+ unit->clearUnitState(UNIT_STAT_ONVEHICLE);
//SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);