Likes: 0
Results 1 to 1 of 1
-
22-12-22, 01:36 AM #1
Allow flying mounts (aura) for GMs
Register to remove this adAllow flying mounts (aura) for GMs
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:
Code:bool Player::CanFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const { 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; }
Code:// continent limitation (virtual continent) 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; } }
Hoping it will help someone out someday
› See More: Allow flying mounts (aura) for GMs
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog