Skip to content

Commit

Permalink
setup instanced style mobs general rules
Browse files Browse the repository at this point in the history
  • Loading branch information
KnowOne134 committed Feb 11, 2025
1 parent 0e14596 commit f2b897c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/map/utils/mobutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,11 @@ namespace mobutils
SetupNMMob(PMob);
}

if (zoneType & ZONE_TYPE::INSTANCED)
{
SetupDungeonInstanceMob(PMob);
}

if (PMob->m_Type & MOBTYPE_EVENT)
{
SetupEventMob(PMob);
Expand Down Expand Up @@ -1155,6 +1160,26 @@ namespace mobutils
}
}

void SetupDungeonInstanceMob(CMobEntity* PMob)
{
PMob->setMobMod(MOBMOD_GIL_MAX, 0);
PMob->setMobMod(MOBMOD_MUG_GIL, 0);
PMob->loc.p = PMob->m_SpawnPoint;
// never despawn
PMob->SetDespawnTime(0s);
PMob->setMobMod(MOBMOD_NO_DESPAWN, 1);
// Salvage and Nyzul
if (PMob->getZone() >= ZONE_ZHAYOLM_REMNANTS && PMob->getZone() <= ZONE_NYZUL_ISLE)
{
// Salvage and Nyzul mobs can not be charmed
PMob->setMobMod(MOBMOD_CHARMABLE, 0);
if (PMob->getZone() != ZONE_NYZUL_ISLE)
{
PMob->setMobMod(MOBMOD_CHECK_AS_NM, 1);
}
}
}

void RecalculateSpellContainer(CMobEntity* PMob)
{
// clear spell list
Expand Down
1 change: 1 addition & 0 deletions src/map/utils/mobutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ namespace mobutils
void SetupDungeonMob(CMobEntity* PMob);
void SetupEventMob(CMobEntity* PMob);
void SetupNMMob(CMobEntity* PMob);
void SetupDungeonInstanceMob(CMobEntity* PMob);
void SetupPetSkills(CMobEntity* PMob);

uint8 JobSkillRankToBaseEvaRank(JOBTYPE job);
Expand Down

0 comments on commit f2b897c

Please sign in to comment.