mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
[Crash fix] Fix format item crash
This commit is contained in:
parent
01f317b9c8
commit
966c8e652b
@ -336,11 +336,11 @@ std::string const ChatHelper::FormatItem(ItemTemplate const* proto, uint32 count
|
|||||||
char color[32];
|
char color[32];
|
||||||
sprintf(color, "%x", ItemQualityColors[proto->Quality]);
|
sprintf(color, "%x", ItemQualityColors[proto->Quality]);
|
||||||
|
|
||||||
const std::string &name = sObjectMgr->GetItemLocale(proto->ItemId)->Name[sWorld->GetDefaultDbcLocale()];
|
// const std::string &name = sObjectMgr->GetItemLocale(proto->ItemId)->Name[sWorld->GetDefaultDbcLocale()];
|
||||||
|
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "|c" << color << "|Hitem:" << proto->ItemId
|
out << "|c" << color << "|Hitem:" << proto->ItemId
|
||||||
<< ":0:0:0:0:0:0:0" << "|h[" << name
|
<< ":0:0:0:0:0:0:0" << "|h[" << proto->Name1
|
||||||
<< "]|h|r";
|
<< "]|h|r";
|
||||||
|
|
||||||
if (count > 1)
|
if (count > 1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user