Jump to content
TrinityCore

Search the Community

Showing results for tags 'compatible with obsolete code[hostilerefmanager]'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Releases and Announcements
  • Help and Support
    • Help and Support
  • Offtopic
    • Trinitycore.org Website issues
    • Chillout Room

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I have an old code that needs to be compatible with the latest TC 335.The code is like this ############################################################ void AttackersValue::AddAttackersOf(Unit* unit, set<Unit*>& targets) { HostileRefManager& refManager = unit->getHostileRefManager(); HostileReference *ref = refManager.getFirst(); if (!ref) return; while( ref ) { ThreatManager *threatManager = ref->GetSource(); Unit *attacker = threatManager->GetOwner(); Unit *victim = attacker->GetVictim(); if (victim == unit) targets.insert(attacker); ref = ref->next(); } } ############################################################ If we want to rewrite the method implementation of the new TC, how should we modify it?Mainly part HostileRefManager and Unit *attacker .. sorry my bad english.I sincerely thank you for help me.
×
×
  • Create New...