mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/DataStores: Updated opcodes and db2 to 7.0.3.21414
This commit is contained in:
@@ -559,7 +559,7 @@ public:
|
||||
{
|
||||
FactionState const& faction = itr->second;
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID);
|
||||
char const* factionName = factionEntry ? factionEntry->Name_lang : "#Not found#";
|
||||
char const* factionName = factionEntry ? factionEntry->Name->Str[loc] : "#Not found#";
|
||||
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
|
||||
std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]);
|
||||
std::ostringstream ss;
|
||||
|
||||
@@ -1540,11 +1540,11 @@ public:
|
||||
if (difficulty == -1)
|
||||
for (uint8 diff = 0; diff < MAX_DIFFICULTY; ++diff)
|
||||
{
|
||||
if (GetMapDifficultyData(mEntry->ID, Difficulty(diff)))
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(diff));
|
||||
if (sDB2Manager.GetMapDifficultyData(map, Difficulty(diff)))
|
||||
sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(diff));
|
||||
}
|
||||
else
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(difficulty));
|
||||
sInstanceSaveMgr->ForceGlobalReset(map, Difficulty(difficulty));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Zone2MapCoordinates(x, y, areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId);
|
||||
sDB2Manager.Zone2MapCoordinates(areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId, x, y);
|
||||
|
||||
if (!MapManager::IsValidMapCoord(zoneEntry->MapID, x, y))
|
||||
{
|
||||
|
||||
@@ -309,58 +309,77 @@ public:
|
||||
|
||||
for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id)
|
||||
{
|
||||
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(id))
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(id);
|
||||
if (factionEntry)
|
||||
{
|
||||
FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL;
|
||||
|
||||
std::string name = factionEntry->Name_lang;
|
||||
int locale = handler->GetSessionDbcLocale();
|
||||
std::string name = factionEntry->Name->Str[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
if (!Utf8FitTo(name, wNamePart))
|
||||
continue;
|
||||
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
locale = 0;
|
||||
for (; locale < TOTAL_LOCALES; ++locale)
|
||||
{
|
||||
if (locale == handler->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = factionEntry->Name->Str[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
if (Utf8FitTo(name, wNamePart))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
|
||||
// or "id - [faction] [no reputation]" format
|
||||
std::ostringstream ss;
|
||||
if (handler->GetSession())
|
||||
ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << "]|h|r";
|
||||
else
|
||||
ss << id << " - " << name;
|
||||
|
||||
if (factionState) // and then target != NULL also
|
||||
if (locale < TOTAL_LOCALES)
|
||||
{
|
||||
uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
|
||||
std::string rankName = handler->GetTrinityString(index);
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
|
||||
// send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
|
||||
// or "id - [faction] [no reputation]" format
|
||||
std::ostringstream ss;
|
||||
if (handler->GetSession())
|
||||
ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << ' ' << localeNames[locale] << "]|h|r";
|
||||
else
|
||||
ss << id << " - " << name << ' ' << localeNames[locale];
|
||||
|
||||
if (factionState->Flags & FACTION_FLAG_VISIBLE)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_VISIBLE);
|
||||
if (factionState->Flags & FACTION_FLAG_AT_WAR)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_ATWAR);
|
||||
if (factionState->Flags & FACTION_FLAG_PEACE_FORCED)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED);
|
||||
if (factionState->Flags & FACTION_FLAG_HIDDEN)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_HIDDEN);
|
||||
if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
|
||||
if (factionState->Flags & FACTION_FLAG_INACTIVE)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_INACTIVE);
|
||||
if (factionState) // and then target != NULL also
|
||||
{
|
||||
uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
|
||||
std::string rankName = handler->GetTrinityString(index);
|
||||
|
||||
ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
|
||||
|
||||
if (factionState->Flags & FACTION_FLAG_VISIBLE)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_VISIBLE);
|
||||
if (factionState->Flags & FACTION_FLAG_AT_WAR)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_ATWAR);
|
||||
if (factionState->Flags & FACTION_FLAG_PEACE_FORCED)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED);
|
||||
if (factionState->Flags & FACTION_FLAG_HIDDEN)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_HIDDEN);
|
||||
if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
|
||||
if (factionState->Flags & FACTION_FLAG_INACTIVE)
|
||||
ss << handler->GetTrinityString(LANG_FACTION_INACTIVE);
|
||||
}
|
||||
else
|
||||
ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION);
|
||||
|
||||
handler->SendSysMessage(ss.str().c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION);
|
||||
|
||||
handler->SendSysMessage(ss.str().c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
float zoneX = object->GetPositionX();
|
||||
float zoneY = object->GetPositionY();
|
||||
|
||||
Map2ZoneCoordinates(zoneX, zoneY, zoneId);
|
||||
sDB2Manager.Map2ZoneCoordinates(zoneId, zoneX, zoneY);
|
||||
|
||||
Map const* map = object->GetMap();
|
||||
float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
|
||||
@@ -1168,10 +1168,10 @@ public:
|
||||
if (itemNameStr && itemNameStr[0])
|
||||
{
|
||||
std::string itemName = itemNameStr+1;
|
||||
auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](std::pair<uint32, ItemSparseEntry const*> kv)
|
||||
auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* sparse)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_LOCALES; ++i)
|
||||
if (itemName == kv.second->Name->Str[i])
|
||||
if (itemName == sparse->Name->Str[i])
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
itemId = itr->first;
|
||||
itemId = itr->ID;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@@ -1795,7 +1795,7 @@ public:
|
||||
|
||||
// Output XI. LANG_PINFO_CHR_RACE
|
||||
raceStr = DB2Manager::GetChrRaceName(raceid, locale);
|
||||
classStr = GetClassName(classid, locale);
|
||||
classStr = DB2Manager::GetClassName(classid, locale);
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetTrinityString(LANG_CHARACTER_GENDER_MALE) : handler->GetTrinityString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
|
||||
|
||||
// Output XII. LANG_PINFO_CHR_ALIVE
|
||||
|
||||
@@ -1008,14 +1008,14 @@ public:
|
||||
|
||||
if (factionEntry->ReputationIndex < 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name_lang, factionId);
|
||||
handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name->Str[handler->GetSessionDbcLocale()], factionId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false);
|
||||
target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry));
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name_lang, factionId,
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name->Str[handler->GetSessionDbcLocale()], factionId,
|
||||
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
#include "CombatAI.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Chat.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "DBCStores.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "SpellHistory.h"
|
||||
#include "SkillDiscovery.h"
|
||||
#include "Battleground.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
// Generic script for handling item dummy effects which trigger another spell.
|
||||
class spell_item_trigger_spell : public SpellScriptLoader
|
||||
|
||||
@@ -745,6 +745,8 @@ class spell_mage_living_bomb : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (!spellInfo->GetEffect(EFFECT_1))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->GetEffect(EFFECT_1)->CalcValue())))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
@@ -107,9 +107,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritSpell = 0.0f;
|
||||
// Crit from Intellect
|
||||
CritSpell += owner->GetSpellCritFromIntellect();
|
||||
float CritSpell = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
|
||||
CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
@@ -126,9 +124,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritMelee = 0.0f;
|
||||
// Crit from Agility
|
||||
CritMelee += owner->GetMeleeCritFromAgility();
|
||||
float CritMelee = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
|
||||
CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
@@ -676,9 +672,7 @@ public:
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritSpell = 0.0f;
|
||||
// Crit from Intellect
|
||||
CritSpell += owner->GetSpellCritFromIntellect();
|
||||
float CritSpell = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
|
||||
CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
@@ -698,9 +692,7 @@ public:
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritMelee = 0.0f;
|
||||
// Crit from Agility
|
||||
CritMelee += owner->GetMeleeCritFromAgility();
|
||||
float CritMelee = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
|
||||
CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
@@ -1266,9 +1258,7 @@ public:
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritSpell = 0.0f;
|
||||
// Crit from Intellect
|
||||
// CritSpell += owner->GetSpellCritFromIntellect();
|
||||
float CritSpell = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
|
||||
// CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
@@ -1287,9 +1277,7 @@ public:
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritMelee = 0.0f;
|
||||
// Crit from Agility
|
||||
// CritMelee += owner->GetMeleeCritFromAgility();
|
||||
float CritMelee = 5.0f;
|
||||
// Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
|
||||
// CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
|
||||
// Increase crit from SPELL_AURA_MOD_CRIT_PCT
|
||||
|
||||
Reference in New Issue
Block a user