Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

allow NMs to also be bound when using charm #332

Merged
merged 1 commit into from
Jan 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/map/utils/battleutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3825,13 +3825,9 @@ namespace battleutils
// player charming mob
if (PVictim->objtype == TYPE_MOB && PCharmer->objtype == TYPE_PC)
{
// cannot charm NM
if (((CMobEntity*)PVictim)->m_Type & MOBTYPE_NOTORIOUS) {
return;
}

//Bind uncharmable mobs for 5 seconds
if ( ((CMobEntity*)PVictim)->getMobMod(MOBMOD_CHARMABLE) == 0 || PVictim->PMaster != nullptr) {
//Bind uncharmable mobs and NMs for 1 to 5 seconds
if ( ((CMobEntity*)PVictim)->getMobMod(MOBMOD_CHARMABLE) == 0 || ((CMobEntity*)PVictim)->m_Type & MOBTYPE_NOTORIOUS || PVictim->PMaster != nullptr)
{
PVictim->StatusEffectContainer->AddStatusEffect(
new CStatusEffect(EFFECT_BIND, EFFECT_BIND, 1, 0, tpzrand::GetRandomNumber(1, 5)));
return;
Expand Down