diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Level1.cpp | 2 | ||||
-rw-r--r-- | src/game/ObjectMgr.cpp | 3 | ||||
-rw-r--r-- | src/game/Player.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 13 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 4 | ||||
-rw-r--r-- | src/game/Unit.cpp | 1 | ||||
-rw-r--r-- | src/game/Vehicle.cpp | 10 |
7 files changed, 20 insertions, 17 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 86a689e7383..f8acec049c2 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -1524,7 +1524,7 @@ bool ChatHandler::HandleModifyASpeedCommand(const char* args) float ASpeed = (float)atof((char*)args); - if (ASpeed > 10 || ASpeed < 0.1) + if (ASpeed > 50 || ASpeed < 0) { SendSysMessage(LANG_BAD_VALUE); SetSentErrorMessage(true); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 350bf5d3a15..38ba9c33a6c 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -6467,6 +6467,9 @@ void ObjectMgr::LoadNPCSpellClickSpells() continue; } + if(!(cInfo->npcflag & UNIT_NPC_FLAG_SPELLCLICK)) + const_cast<CreatureInfo*>(cInfo)->npcflag |= UNIT_NPC_FLAG_SPELLCLICK; + uint32 spellid = fields[1].GetUInt32(); SpellEntry const *spellinfo = sSpellStore.LookupEntry(spellid); if (!spellinfo) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d647768d3e0..7099b7e3945 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17437,6 +17437,10 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc // stop combat at start taxi flight if any CombatStop(); + StopCastingCharm(); + StopCastingBindSight(); + ExitVehicle(); + // stop trade (client cancel trade at taxi map open but cheating tools can be used for reopen it) TradeCancel(true); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 3e6c1e3ff41..43f004d7701 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3879,10 +3879,9 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* AuraType type = AuraType(GetAuraName()); //Prevent handling aura twice - if(apply && m_target->GetAurasByType(type).size()>1) - return; - if(!apply && m_target->HasAuraType(type)) + if(apply ? m_target->GetAurasByType(type).size() > 1 : m_target->HasAuraType(type)) return; + uint32 field, flag, slot; WeaponAttackType attType; switch (type) @@ -3905,6 +3904,8 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* slot=EQUIPMENT_SLOT_RANGED; attType=RANGED_ATTACK; break; + default: + return; } if(apply) m_target->SetFlag(field, flag); @@ -3913,10 +3914,8 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* if (m_target->GetTypeId() == TYPEID_PLAYER) { - Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot ); - if(!pItem ) - return; - ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply); + if(Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot )) + ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply); } else if (((Creature*)m_target)->GetCurrentEquipmentId()) m_target->UpdateDamagePhysical(attType); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0c8a4eee292..e26c8c25827 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3393,10 +3393,8 @@ void Spell::EffectSummonType(uint32 i) vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); if(damage) - { m_caster->CastSpell(vehicle, damage, true); - m_caster->EnterVehicle(vehicle); - } + m_caster->EnterVehicle(vehicle); break; } } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bc2f6b0b540..156a22a4b33 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13618,7 +13618,6 @@ void Unit::SetCharmedBy(Unit* charmer, CharmType type) if(GetTypeId() == TYPEID_UNIT) { ((Creature*)this)->AI()->OnCharmed(true); - GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); } else diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index 3efe735a5b5..5197e799104 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -24,7 +24,6 @@ #include "Util.h" #include "WorldPacket.h" -#include "Chat.h" #include "CreatureAI.h" #include "ZoneScript.h" @@ -85,6 +84,11 @@ void Vehicle::setDeathState(DeathState s) // overwrite vir } RemoveAllPassengers(); } + else if(s == JUST_ALIVED) + { + if(m_usableSeatNum) + SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + } Creature::setDeathState(s); } @@ -244,13 +248,9 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId) GetPositionZ() + unit->m_movementInfo.t_z, GetOrientation()); - unit->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE); - WorldPacket data; if(unit->GetTypeId() == TYPEID_PLAYER) { - //ChatHandler(player).PSendSysMessage("Enter seat %u %u", veSeat->m_ID, seat->first); - if(seat->first == 0 && seat->second.seatInfo->IsUsable()) // not right SetCharmedBy(unit, CHARM_TYPE_VEHICLE); |