Core/Refactor: Part 3

This commit is contained in:
hondacrx
2018-05-16 19:57:48 -04:00
parent 225a5d27f7
commit 5dacd669b5
112 changed files with 564 additions and 561 deletions
+1 -1
View File
@@ -1177,7 +1177,7 @@ namespace Game.Entities
SetModifierValue(UnitMods.AttackPower, UnitModifierType.BaseValue, stats.AttackPower);
SetModifierValue(UnitMods.AttackPowerRanged, UnitModifierType.BaseValue, stats.RangedAttackPower);
float armor = stats.GenerateArmor(cInfo); /// @todo Why is this treated as uint32 when it's a float?
float armor = stats.GenerateArmor(cInfo); // @todo Why is this treated as uint32 when it's a float?
SetModifierValue(UnitMods.Armor, UnitModifierType.BaseValue, armor);
}
+4 -4
View File
@@ -73,20 +73,20 @@ namespace Game.Misc
/// <param name="action">action Custom action given to OnGossipHello.</param>
public void AddMenuItem(uint menuId, uint optionIndex, uint sender, uint action)
{
/// Find items for given menu id.
// Find items for given menu id.
var bounds = Global.ObjectMgr.GetGossipMenuItemsMapBounds(menuId);
/// Return if there are none.
// Return if there are none.
if (bounds.Empty())
return;
/// Iterate over each of them.
// Iterate over each of them.
foreach (var item in bounds)
{
// Find the one with the given menu item id.
if (item.OptionIndex != optionIndex)
continue;
/// Store texts for localization.
// Store texts for localization.
string strOptionText = "", strBoxText = "";
BroadcastTextRecord optionBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(item.OptionBroadcastTextId);
BroadcastTextRecord boxBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(item.BoxBroadcastTextId);