EDIT: forgot to write it is mangos core in thread name, cant edit that
ok, i know there is lots of threads about this
however all i can find is outdated, ~2008
so i gotta make new thread, anyway, im enabling flying mounts everywhere, or at least map 1 and 0 (classic wow maps)
i tried figguring it out on my own from the code provided from old threads but my knowledge of c++ is non-existing
from mangos forum and here i found posts that you should just change
Code:
// remove new continent flight forms
if( !isGameMaster() &&
GetVirtualMapForMapAndZone(GetMapId(),newZone) != 530)
{
RemoveSpellsCausingAura(SPELL_AURA_MOD_SPEED_MOUNTED_FLIGHT);
RemoveSpellsCausingAura(SPELL_AURA_FLY);
}
and
Code:
case SPELL_AURA_FLY:
{
// not allow cast fly spells at old maps by players (all spells is self target)
if(m_caster->GetTypeId()==TYPEID_PLAYER)
{
if( !((Player*)m_caster)->isGameMaster() &&
GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530)
return SPELL_FAILED_NOT_HERE;
}
};break;
default:break;
so majority of it is a comment, this code however is changed or removed from their original locations, being spell.cpp and player.cpp
from what i can find the new code in spell is simmilar but in player.cpp its way different
NEW and current player.cpp
Code:
void Player::UpdateZoneDependentAuras( uint32 newZone )
{
// Some spells applied at enter into zone (with subzones), aura removed in UpdateAreaDependentAuras that called always at zone->area update
SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAreaMapBounds(newZone);
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if(itr->second->autocast && itr->second->IsFitToRequirements(this,newZone,0))
if( !HasAura(itr->second->spellId,0) )
CastSpell(this,itr->second->spellId,true);
}
NEW and current spell.cpp
Code:
case SPELL_AURA_FLY:
case SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED:
{
// not allow cast fly spells if not have req. skills (all spells is self target)
// allow always ghost flight spells
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isAlive())
{
if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId(),zone))
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;
}
case SPELL_AURA_PERIODIC_MANA_LEECH:
{
if (!m_targets.getUnitTarget())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
if (m_caster->GetTypeId() != TYPEID_PLAYER || m_CastItem)
break;
if(m_targets.getUnitTarget()->getPowerType() != POWER_MANA)
return SPELL_FAILED_BAD_TARGETS;
break;
}
default:
break;
im probably way off in terms of the player.cpp code but thats all i can find that is remotely like earlier posts, as for spell.cpp its very much same exept more stuff added
so can anyone lemme know what to change exactly, yeah i know about needing item to use and normal mounts will never work and yadayada, what im talking about is the source edit to make it possible for those items to work at all
im running rev 9134 Mangos (3.2.2a) if you want to test and look through files yourself, you can download this rev source here
http://github.com/mangos/mangos/tree...1b21338629cd24
edit2: from my tests in editing i either successfully compiled with no errors or no changes working whatsoever on server side, also gotten 2 error in 1 attempt, and once i actualy got 3 error, all of these 3 compile attempts i was testing, when i replaced the new code with old and compiled i got no error but it didnt work, when i tried to just comment the new code, i got 3 error, and when i tried deleting all of the new code (seen above) i got 2 error, dont know if this will help you in any way but i thought i'd at least report it
edit3: ofc good reply will get rep!