PDA

Просмотр полной версии : Unit ownership API and field reshuffle to resolve recent confusion


newsbot
10.01.2018, 23:32
Автор: Warlockbugs


<pre style='white-space:pre-wrap;width:81ex'>Unit ownership API and field reshuffle to resolve recent confusion

Protected API prevents accidental misuse of raw unit field APIs in scripts.

I expect to revisit this topic at some point to make it even more consistent, but it goes beyond the reason of this patch for now.

Changes:
* Unit guid fields API is now protected. Use new public APIs instead.
* [Pre-WotLK] Companion API (also known as Mini-pets/Critters) was moved to Unit class and syncronized with WotLK core. NPCs can now summon companions via spells.
* GetSelectionGuid()/SetSelectionGuid() is now moved to Unit and virtualized.
* Unit method GetSpellModOwner() is now virtualized for Player, Totem and Pet classes to imrpove performance.
* Former Unit method isCharmed() was absorbed within new APIs and removed.</pre>


Подробнее... (https://github.com/cmangos/mangos-wotlk/commit/d9ef4e50575a91378919062b3a335af2020c336c)