mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[c12582] Add support for XP-Gain disabling
This commit is contained in:
parent
132e6245a7
commit
e0192deaf6
7 changed files with 122 additions and 51 deletions
|
|
@ -643,6 +643,8 @@ void ScriptMgr::LoadScripts(ScriptMapMapName& scripts, const char* tablename)
|
|||
}
|
||||
case SCRIPT_COMMAND_PAUSE_WAYPOINTS: // 32
|
||||
break;
|
||||
case SCRIPT_COMMAND_XP_USER: // 33
|
||||
break;
|
||||
default:
|
||||
{
|
||||
sLog.outErrorDb("Table `%s` unknown command %u, skipping.", tablename, tmp.command);
|
||||
|
|
@ -1690,6 +1692,18 @@ bool ScriptAction::HandleScriptStep()
|
|||
((Creature*)pSource)->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED);
|
||||
break;
|
||||
}
|
||||
case SCRIPT_COMMAND_XP_USER: // 33
|
||||
{
|
||||
Player* pPlayer = GetPlayerTargetOrSourceAndLog(pSource, pTarget);
|
||||
if (!pPlayer)
|
||||
break;
|
||||
|
||||
if (m_script->xpDisabled.flags)
|
||||
pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_XP_USER_DISABLED);
|
||||
else
|
||||
pPlayer->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_XP_USER_DISABLED);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog.outError(" DB-SCRIPTS: Process table `%s` id %u, command %u unknown command used.", m_table, m_script->id, m_script->command);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue