Forum > Miscellaneous

[QUESTION] [Trinitycore]Flying Mounts Spell Requirements

<< < (3/4) > >>

Nupper:

--- Quote from: "schlumpf" ---
--- Quote ---I Fixed issue where the mount dismounts upon changing area
--- End quote ---

What did you do? Did you change  the two things I pointed out? How does it look now?
--- End quote ---

 I listed the map as Continent in DBCstructure...This fixed issue with it dismounting when changing area change..
The last issue we currently have is that we want the Flying to require "Flight Master's Liscense" to fly in mapID 869.
Currently you can dismount with or without it.

"Flight Master's Liscense" = Spell ID: 93333

schlumpf:
You really are horrible at answering questions.

Nupper:

--- Quote from: "schlumpf" ---You really are horrible at answering questions.
--- End quote ---
I have known that for some time.

Changes
Player.CPP

--- Code: ---{
    // continent checked in SpellInfo::CheckLocation at cast and area update
    uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying
return v_map != 869 || HasSpell(93333); // 93333 = Flight Master License
}
--- End code ---

Spell_Generic.cpp

--- Code: ---                    // Triggered spell id dependent on riding skill and zone
                    bool canFly = false;
                    uint32 map = GetVirtualMapForMapAndZone(target->GetMapId(), target->GetZoneId());
if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING || (map == 869 && target->HasSpell(SPELL_OSHOTH_FLYING)))))
                        canFly = true;

--- End code ---

schlumpf:
So that first thing now _only_ checks the new one, no longer northrend and cold weather flying. The second function now checks if the player is in expansion01 or in northrend and has the spell 1.

Nupper:

--- Quote from: "schlumpf" ---So that first thing now _only_ checks the new one, no longer northrend and cold weather flying. The second function now checks if the player is in expansion01 or in northrend and has the spell 1.
--- End quote ---
The map name for 869 is Oshoth.
I am still curious on how to get it to check both.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version