50 plus cmangos updates implemented (to c12832)

Implemented over 50 updates from the cmangos Cata repo, up to and
including c12832 Improve random movement

The core will now work with the creature_template update that was
applied to the database yesterday.
This commit is contained in:
Charles A Edwards 2016-08-16 11:58:07 +01:00 committed by Antz
parent 12f8fbf37d
commit e4d1bdfc74
80 changed files with 3164 additions and 2965 deletions

View file

@ -142,6 +142,7 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature& creature)
if (behavior->textid[0])
{
int32 textId = behavior->textid[0];
// Not only one text is set
if (behavior->textid[1])
{
@ -153,10 +154,13 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature& creature)
break;
}
creature.MonsterSay(behavior->textid[rand() % i], LANG_UNIVERSAL);
textId = behavior->textid[urand(0, i - 1)];
}
if (MangosStringLocale const* textData = sObjectMgr.GetMangosStringLocale(textId))
creature.MonsterText(textData, nullptr);
else
creature.MonsterSay(behavior->textid[0], LANG_UNIVERSAL);
sLog.outErrorDb("%s reached waypoint %u, attempted to do text %i, but required text-data could not be found", creature.GetGuidStr().c_str(), i_currentNode, textId);
}
}