void CUITargetBarPlug::SetTargetHp(Packet& pkt)
{
uint16 tid, damage, ssid;
uint8 echo;
int maxhp, hp;
pkt >> tid >> echo >> maxhp >> hp >> damage >> ssid;
if (tid == 9999)
{
userType = echo;
return;
}
userid = tid;
int percent = (int)ceil((hp * 100) / maxhp);
std::string max = Engine->StringHelper->NumberFormat(maxhp);
std::string cur = Engine->StringHelper->NumberFormat(hp);
std::string str = xorstr("%s/%s (%d%%)");
Engine->SetString(m_dTextTargetHp, string_format(str, cur.c_str(), max.c_str(), percent));
}
Hook tan bu kısmı kapatman gerek