|
|
|
@ -53,6 +53,7 @@ Creature::Creature() : Thing()
|
|
|
|
|
m_skull = Otc::SkullNone;
|
|
|
|
|
m_shield = Otc::ShieldNone;
|
|
|
|
|
m_emblem = Otc::EmblemNone;
|
|
|
|
|
m_type = Proto::CreatureTypeUnknown;
|
|
|
|
|
m_icon = Otc::NpcIconNone;
|
|
|
|
|
m_lastStepDirection = Otc::InvalidDirection;
|
|
|
|
|
m_nameCache.setFont(g_fonts.getFont("verdana-11px-rounded"));
|
|
|
|
@ -309,6 +310,11 @@ void Creature::drawInformation(const Point& point, bool useGray, const Rect& par
|
|
|
|
|
Rect emblemRect = Rect(backgroundRect.x() + 13.5 + 12, backgroundRect.y() + 16, m_emblemTexture->getSize());
|
|
|
|
|
g_painter->drawTexturedRect(emblemRect, m_emblemTexture);
|
|
|
|
|
}
|
|
|
|
|
if(m_type != Proto::CreatureTypeUnknown && m_typeTexture) {
|
|
|
|
|
g_painter->setColor(Color::white);
|
|
|
|
|
Rect typeRect = Rect(backgroundRect.x() + 13.5 + 12 + 12, backgroundRect.y() + 16, m_typeTexture->getSize());
|
|
|
|
|
g_painter->drawTexturedRect(typeRect, m_typeTexture);
|
|
|
|
|
}
|
|
|
|
|
if(m_icon != Otc::NpcIconNone && m_iconTexture) {
|
|
|
|
|
g_painter->setColor(Color::white);
|
|
|
|
|
Rect iconRect = Rect(backgroundRect.x() + 13.5 + 12, backgroundRect.y() + 5, m_iconTexture->getSize());
|
|
|
|
@ -745,6 +751,12 @@ void Creature::setEmblem(uint8 emblem)
|
|
|
|
|
callLuaField("onEmblemChange", m_emblem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Creature::setType(uint8 type)
|
|
|
|
|
{
|
|
|
|
|
m_type = type;
|
|
|
|
|
callLuaField("onTypeChange", m_type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Creature::setIcon(uint8 icon)
|
|
|
|
|
{
|
|
|
|
|
m_icon = icon;
|
|
|
|
@ -776,12 +788,16 @@ void Creature::setEmblemTexture(const std::string& filename)
|
|
|
|
|
m_emblemTexture = g_textures.getTexture(filename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Creature::setTypeTexture(const std::string& filename)
|
|
|
|
|
{
|
|
|
|
|
m_typeTexture = g_textures.getTexture(filename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Creature::setIconTexture(const std::string& filename)
|
|
|
|
|
{
|
|
|
|
|
m_iconTexture = g_textures.getTexture(filename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Creature::setSpeedFormula(double speedA, double speedB, double speedC)
|
|
|
|
|
{
|
|
|
|
|
m_speedFormula[Otc::SpeedFormulaA] = speedA;
|
|
|
|
|