MCPcopy Create free account
hub / github.com/crossuo/crossuo / AddDescription

Method AddDescription

src/Profession.cpp:16–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16bool CBaseProfession::AddDescription(int desc, const astr_t &name, const char *val)
17{
18 bool result = (DescriptionIndex == desc);
19 if (result)
20 {
21 if (NameClilocID == 0u)
22 {
23 Name = name;
24 }
25
26 g_FontManager.SetUseHTML(true);
27 if (desc == -2)
28 {
29 Description = wstr_from(val);
30 }
31 else
32 {
33 Description = wstr_from(name + "\n" + val);
34 }
35
36 g_FontManager.SetUseHTML(false);
37 }
38 else
39 {
40 for (CBaseProfession *obj = (CBaseProfession *)m_Items; obj != nullptr && !result;
41 obj = (CBaseProfession *)obj->m_Next)
42 {
43 result = obj->AddDescription(desc, name, val);
44 }
45 }
46
47 return result;
48}
49
50CProfessionCategory::CProfessionCategory()
51 : CBaseProfession()

Callers 1

Calls 2

wstr_fromFunction · 0.85
SetUseHTMLMethod · 0.80

Tested by

no test coverage detected