[Archive] [CORE 335] Allow flying mounts (aura) for GMs
[Archive] [CORE 335] Allow flying mounts (aura) for GMs
Quote: bool Player::CanFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) constIn the SpellInfo.cpp file, in the CheckLocation method, modify the part concerning the limitations by continent as follows:
{
if (IsGameMaster())
return true;
// continent checked in SpellInfo::CheckLocation at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING))
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
return false;
return true;
}
Click to expand...
Quote: // continent limitation (virtual continent)I specify that I equip my mounts through the command ".aura", you can not go through the classic method (catalog of frames) because there is a verification on the client side.
if (HasAttribute(SPELL_ATTR4_CAST_ONLY_IN_OUTLAND))
{
if (strict)
{
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
if (!areaEntry)
areaEntry = sAreaTableStore.LookupEntry(zone_id);
if (!areaEntry || !areaEntry->IsFlyable() || !player->CanFlyInZone(map_id, zone_id, this))
return SPELL_FAILED_INCORRECT_AREA;
}
else
{
uint32 const v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
if(!mapEntry)
return SPELL_FAILED_INCORRECT_AREA;
if (!player->IsGameMaster())
{
if(mapEntry->Expansion() < 1 || !mapEntry->IsContinent())
return SPELL_FAILED_INCORRECT_AREA;
}
//if (!mapEntry || mapEntry->Expansion() < 1 || !mapEntry->IsContinent() || !player->IsGameMaster())
// return SPELL_FAILED_INCORRECT_AREA;
}
}
Click to expand...
Archived author: dokuro • Posted: 2025-11-04T18:04:38.128666
Original source
Allow flying mounts (aura) for GMs
Hello !
If, as GM, you enjoy flying in a flying mount on Azeroth, you may encounter a difficulty when changing area.
Indeed, there is a server-side check that will take you down from the mount, even if you are GM.
Here's how to fix the problem in the core.
In the player.cpp, replace the "CanFlyInZone" method as follows:
Quote: bool Player::CanFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) constIn the SpellInfo.cpp file, in the CheckLocation method, modify the part concerning the limitations by continent as follows:
{
if (IsGameMaster())
return true;
// continent checked in SpellInfo::CheckLocation at cast and area update
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING))
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
return false;
return true;
}
Click to expand...
Quote: // continent limitation (virtual continent)I specify that I equip my mounts through the command ".aura", you can not go through the classic method (catalog of frames) because there is a verification on the client side.
if (HasAttribute(SPELL_ATTR4_CAST_ONLY_IN_OUTLAND))
{
if (strict)
{
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
if (!areaEntry)
areaEntry = sAreaTableStore.LookupEntry(zone_id);
if (!areaEntry || !areaEntry->IsFlyable() || !player->CanFlyInZone(map_id, zone_id, this))
return SPELL_FAILED_INCORRECT_AREA;
}
else
{
uint32 const v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
if(!mapEntry)
return SPELL_FAILED_INCORRECT_AREA;
if (!player->IsGameMaster())
{
if(mapEntry->Expansion() < 1 || !mapEntry->IsContinent())
return SPELL_FAILED_INCORRECT_AREA;
}
//if (!mapEntry || mapEntry->Expansion() < 1 || !mapEntry->IsContinent() || !player->IsGameMaster())
// return SPELL_FAILED_INCORRECT_AREA;
}
}
Click to expand...