And thanks to Akkadius for a much smarter way! This method pulls the 'cancastoutdoor' field from the zone table and removes the mount buff when you enter a zone that disallows outdoor spells.
This will use the MySQL plugins (be sure to get the new one and read about the new JSON loader
http://www.eqemulator.org/forums/showthread.php?t=41690)
Code:
sub EVENT_ENTERZONE {
#::: Dismount on indoor zone
$ex = plugin::LoadMysql()->prepare("SELECT `castoutdoor` from `zone` WHERE `zoneidnumber` = ? AND `castoutdoor` = 0");
$ex->execute($zoneid);
while (@row = $ex->fetchrow_array()) {
quest::debug("[horse_mount] We have zoned into a indoor zone, dismounting...");
$client->BuffFadeByEffect(113);
}
}