Scripts/Quests:

* add support for quest 12634 Some Make Lemonade, Some Make Liquor (implement 51840 spell and Adventurous Dwarf AI, thanks akadabeer)
* implement dummy effect for 49587 Seeds of Nature's Wrath spell (used in quest 12459 That Which Creates Can Also Destroy)
* implement dummy effect for 19512 Apply Salve spell (used in quest 6124/6129 Curing the Sick)
Scripts/Misc: some cleanup in chat log
Core/Locales: fix issue when default locale for trinity_string strings was not used (thanks Aokromes for testing).

--HG--
branch : trunk
This commit is contained in:
azazel
2010-09-16 13:14:14 +06:00
parent 9739bea487
commit 236356628a
11 changed files with 295 additions and 41 deletions
+5 -11
View File
@@ -7800,12 +7800,10 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
data.Content.resize(1);
++count;
// 0 -> default, idx in to idx+1
data.Content[0] = fields[1].GetCppString();
data.Default = fields[1].GetCppString();
for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i+1].GetCppString();
std::string str = fields[i + 1].GetCppString();
AddLocaleString(str, LocaleConstant(i), data.Content);
}
} while (result->NextRow());
@@ -7821,15 +7819,11 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
const char *ObjectMgr::GetTrinityString(int32 entry, int locale_idx) const
{
// locale_idx == -1 -> default, locale_idx >= 0 in to idx+1
// Content[0] always exist if exist TrinityStringLocale
if (TrinityStringLocale const *msl = GetTrinityStringLocale(entry))
{
int idx = locale_idx + 1;
if (int(msl->Content.size()) > idx && !msl->Content[idx].empty())
return msl->Content[idx].c_str();
else
return msl->Content[0].c_str();
std::string s = msl->Default;
GetLocaleString(msl->Content, locale_idx, s);
return s.c_str();
}
if (entry > 0)
+2 -1
View File
@@ -174,7 +174,8 @@ typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
struct TrinityStringLocale
{
StringVector Content; // 0 -> default, i -> i-1 locale index
std::string Default;
StringVector Content;
};
typedef std::map<uint32,uint32> CreatureLinkedRespawnMap;