| 2957 | |
| 2958 | |
| 2959 | int cWorld::SpawnMobFinalize(cMonster * a_Monster) |
| 2960 | { |
| 2961 | if (!a_Monster) |
| 2962 | return -1; |
| 2963 | a_Monster->SetHealth(a_Monster->GetMaxHealth()); |
| 2964 | if (cPluginManager::Get()->CallHookSpawningMonster(*this, *a_Monster)) |
| 2965 | { |
| 2966 | delete a_Monster; |
| 2967 | return -1; |
| 2968 | } |
| 2969 | if (!a_Monster->Initialize(this)) |
| 2970 | { |
| 2971 | delete a_Monster; |
| 2972 | return -1; |
| 2973 | } |
| 2974 | BroadcastSpawnEntity(*a_Monster); |
| 2975 | cPluginManager::Get()->CallHookSpawnedMonster(*this, *a_Monster); |
| 2976 | |
| 2977 | return a_Monster->GetUniqueID(); |
| 2978 | } |
| 2979 | |
| 2980 | |
| 2981 |
nothing calls this directly
no test coverage detected