[DiscordArchive] Which part doesn't work ? Did you debug it with breakpoints?
[DiscordArchive] Which part doesn't work ? Did you debug it with breakpoints?
Archived author: Krutok • Posted: 2024-06-01T12:26:14.239000+00:00
Original source
think that will be the problem
Archived author: Krutok • Posted: 2024-06-01T12:35:05.696000+00:00
Original source
I can't manage to check that
Archived author: jackpoz • Posted: 2024-06-01T12:35:55.127000+00:00
Original source
I think your code is missing a return false after `if (!HasSpell(54197)) // 54197 = Cold Weather Flying`
Archived author: jackpoz • Posted: 2024-06-01T12:36:10.794000+00:00
Original source
is that something you wrote or did you copy it from somewhere ?
Archived author: Krutok • Posted: 2024-06-01T12:38:29.231000+00:00
Original source
```bool Player::CanFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const
{
// 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;
}
```
This is the Original Code ...had only expanded it with
```bool Player::CanFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell) const
{
// 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
if (v_map == 728 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING))
if (!HasSpell(81237)) // 81237 = Dragon Isle Flying
return false;
return true;
}```
Archived author: Foe • Posted: 2024-06-01T12:42:00.515000+00:00
Original source
The first if statement block needs its own return false
Archived author: Krutok • Posted: 2024-06-01T12:43:44.108000+00:00
Original source
ok i will try it
Archived author: jackpoz • Posted: 2024-06-01T12:48:28.383000+00:00
Original source
I think you should check some basic C++ tutorials
Archived author: Krutok • Posted: 2024-06-01T12:51:37.135000+00:00
Original source
yeah now works thx
Archived author: Krutok • Posted: 2024-06-01T12:52:26.614000+00:00
Original source
Yes, I'm working on it...it just takes me a little longer.