Skip to content

Commit

Permalink
Core/Vehicles: Allow damaging NPC passengers.
Browse files Browse the repository at this point in the history
+ Forgotten change from 2effb7
  • Loading branch information
Machiavell1 committed Jul 30, 2011
1 parent 0ecb47b commit b2d3706
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Entities/Unit/Unit.cpp
Expand Up @@ -1162,7 +1162,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
if (!victim)
return;

if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->HasUnitState(UNIT_STAT_ONVEHICLE) && victim->GetVehicleBase() != this) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
return;

SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID);
Expand Down Expand Up @@ -1379,7 +1379,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
{
Unit* victim = damageInfo->target;

if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->HasUnitState(UNIT_STAT_ONVEHICLE) && victim->GetVehicleBase() != this) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
if (!victim->isAlive() || victim->HasUnitState(UNIT_STAT_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
return;

// Hmmmm dont like this emotes client must by self do all animations
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
Expand Up @@ -402,7 +402,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
spellInfo = actualSpellInfo;
}

Spell* spell = new Spell(mover, spellInfo, false, 0, false, true);
Spell* spell = new Spell(mover, spellInfo, false, 0, false);
spell->m_cast_count = castCount; // set count of casts
spell->prepare(&targets);
}
Expand Down

0 comments on commit b2d3706

Please sign in to comment.