Core/Misc: corrected some oversights in recent commits

This commit is contained in:
Ovahlord
2021-01-26 05:37:10 +01:00
parent 928aeccd59
commit c7540fc930
2 changed files with 8 additions and 6 deletions

View File

@@ -419,8 +419,8 @@ void GuildMgr::LoadGuilds()
// Delete orphan guild bank items
CharacterDatabase.DirectExecute("DELETE gbi FROM guild_bank_item gbi LEFT JOIN guild g ON gbi.guildId = g.guildId WHERE g.guildId IS NULL");
// 0 1 2 3 4 5 6 7 8 9 10 11
QueryResult result = CharacterDatabase.Query("SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyType randomPropertyId, durability, creationTime, text, "
// 0 1 2 3 4 5 6 7 8 9 10 11
QueryResult result = CharacterDatabase.Query("SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyType, randomPropertyId, durability, creationTime, text, "
// 12 13 14 15 16
"guildid, TabId, SlotId, item_guid, itemEntry FROM guild_bank_item gbi INNER JOIN item_instance ii ON gbi.item_guid = ii.guid");

View File

@@ -58,11 +58,13 @@ void WaypointMovementGenerator<Creature>::DoInitialize(Creature* creature)
}
// Determine our first waypoint that we want to approach.
uint32 currentWaypointNode = creature->GetCreatureData()->currentwaypoint;
if (_path->Nodes.size() > currentWaypointNode)
if (CreatureData const* creatureData = creature->GetCreatureData())
{
creature->UpdateCurrentWaypointInfo(currentWaypointNode, _path->Id);
_currentNode = currentWaypointNode;
if (_path->Nodes.size() > creatureData->currentwaypoint)
{
creature->UpdateCurrentWaypointInfo(creatureData->currentwaypoint, _path->Id);
_currentNode = creatureData->currentwaypoint;
}
}
// We launch the first movement after a initial 1s delay.