[8015] More dislpay id selection fixes...

* Allow have only A2 or H2 display ids for less strincted DB field data.
* Check model data existance for all provided display ids atserver startup.
* Avoid explicit access to creature info display fields but use display selection functions.
* Rename GetTaxiMount to more clear for returned value GetTaxiMountDisplayId.
* Check display ids in `creature_model_info` at server load.
This commit is contained in:
VladimirMangos 2009-06-14 21:06:41 +04:00
parent a1b941b059
commit 08fe4933c5
14 changed files with 169 additions and 122 deletions

View file

@ -223,7 +223,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint
}
// can't load taxi path without mount set (quest taxi path?)
if(!objmgr.GetTaxiMount(GetTaxiSource(),team,true))
if(!objmgr.GetTaxiMountDisplayId(GetTaxiSource(),team,true))
return false;
return true;
@ -16915,10 +16915,10 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
}
// get mount model (in case non taximaster (npc==NULL) allow more wide lookup)
uint16 mount_id = objmgr.GetTaxiMount(sourcenode, GetTeam(), npc == NULL);
uint32 mount_display_id = objmgr.GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == NULL);
// in spell case allow 0 model
if (mount_id == 0 && spellid == 0 || sourcepath == 0)
if (mount_display_id == 0 && spellid == 0 || sourcepath == 0)
{
WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
data << uint32(ERR_TAXIUNSPECIFIEDSERVERERROR);
@ -16955,7 +16955,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
sLog.outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY");
GetSession()->SendDoFlight(mount_id, sourcepath);
GetSession()->SendDoFlight(mount_display_id, sourcepath);
return true;
}