Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Jan 14, 2025
1 parent 5245db7 commit beecc6f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/src/npchar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,12 @@ void NPChar::postXMLLayout(uint64_t uid, std::string path, std::string xmlString
return;
}
if(auto elem = node->ToElement()){
for(auto attr = elem->FirstAttribute(); attr; attr = attr->Next()){
if(str_tolower(attr->Name()) == "id"){
const_cast<tinyxml2::XMLAttribute *>(attr)->SetAttribute(AESHelper(npc, uid).encode(attr->Value()).c_str());
break;
if(str_tolower(elem->Name()) == "event"){
for(auto attr = elem->FirstAttribute(); attr; attr = attr->Next()){
if(str_tolower(attr->Name()) == "id"){
const_cast<tinyxml2::XMLAttribute *>(attr)->SetAttribute(AESHelper(npc, uid).encode(attr->Value()).c_str());
break;
}
}
}
}
Expand Down

0 comments on commit beecc6f

Please sign in to comment.