| 277 | } |
| 278 | |
| 279 | void CUICharacterInfo::UpdateRelation() |
| 280 | { |
| 281 | if (!m_icons[eUIRelation] || !m_icons[eUIRelationCaption]) |
| 282 | return; |
| 283 | |
| 284 | if (Actor()->ID() == m_ownerID || !hasOwner()) |
| 285 | { |
| 286 | if (m_icons[eUIRelationCaption]) |
| 287 | m_icons[eUIRelationCaption]->Show(false); |
| 288 | if (m_icons[eUIRelation]) |
| 289 | m_icons[eUIRelation]->Show(false); |
| 290 | } |
| 291 | else |
| 292 | { |
| 293 | if (m_icons[eUIRelationCaption]) |
| 294 | m_icons[eUIRelationCaption]->Show(true); |
| 295 | if (m_icons[eUIRelation]) |
| 296 | m_icons[eUIRelation]->Show(true); |
| 297 | |
| 298 | CSE_ALifeTraderAbstract* T = ch_info_get_from_id(m_ownerID); |
| 299 | CSE_ALifeTraderAbstract* TA = ch_info_get_from_id(Actor()->ID()); |
| 300 | |
| 301 | SetRelation(RELATION_REGISTRY().GetRelationType(T, TA), RELATION_REGISTRY().GetAttitude(T, TA)); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | namespace detail |
| 306 | { // helper function implemented in file alife_simulator.cpp |
nothing calls this directly
no test coverage detected