SilkTouchX 0 Posted October 2, 2021 Share Posted October 2, 2021 (edited) Hello, I want to disable mob's aggressivity on a map. What I tried: char_manager.cpp SpawnMobRange function: if (bAgressive) --> if (bAgressive && lMapIndex != 155) It's not working, they're still agressive. How to do it properly? Edited October 2, 2021 by SilkTouchX Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted October 3, 2021 Contributor Share Posted October 3, 2021 (edited) Try this: char_state.cpp void CHARACTER::SetNotAggressive() { REMOVE_BIT(m_pointsInstant.dwAIFlag, AIFLAG_AGGRESSIVE); } char.h: void SetNotAggressive(); Then in char_manager: CHARACTER_MANAGER::SpawnMob look for ch->SetProto(pkMob); and add if (lMapIndex == 155) // or check for it's dungeon mapindex... ch->SetNotAggressive(); Untested but should work.. Edited October 3, 2021 by TMP4 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now