Would this script prevent shutdown?

/Maker: No idea
//Updated

#include “ScriptPCH.h”
#include “ScriptMgr.h”
#include “ScriptedGossip.h”
#include “ScriptedCreature.h”
#include “Player.h”
#include “Unit.h”
#include “World.h”
#include “WorldSession.h”

class gamemasters_security : public PlayerScript
{
public:
gamemasters_security() : PlayerScript(“gamemasters_security”) {}

void OnLogin(Player* player, bool /*firstLogin*/) override
    {
        // Prevent GMs at all ranks to play as a normal player
        if (player->GetSession()->GetSecurity() == 1 || player->GetSession()->GetSecurity() == 2 || player->GetSession()->GetSecurity() == 3)
        {
            for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);
            for (uint8 slot = INVENTORY_SLOT_BAG_START; slot < INVENTORY_SLOT_BAG_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);
            for (uint8 slot = INVENTORY_SLOT_ITEM_START; slot < INVENTORY_SLOT_ITEM_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);
            for (uint8 slot = BANK_SLOT_ITEM_START; slot < BANK_SLOT_ITEM_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);
            for (uint8 slot = BANK_SLOT_BAG_START; slot < BANK_SLOT_BAG_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);
            for (uint8 slot = BUYBACK_SLOT_START; slot < BUYBACK_SLOT_END; slot++)
                player->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true);

        player->EquipNewItem(EQUIPMENT_SLOT_CHEST, 2586, true);
            player->EquipNewItem(EQUIPMENT_SLOT_FEET, 11508, true);
            player->EquipNewItem(EQUIPMENT_SLOT_HEAD, 12064, true);
        }
    }
};

void AddSC_Security_Scripts()
    {
        new gamemasters_security;
    }

my core seems to get stuck in the halting processes…when shutting down.

Maybe try comment out new gamemasters_security; or otherwise disable the script to see if it indeed is the reason.

Dont see why it would be though.

i’ve disabled the script…it still stuck on Halted Process…

The only things i have is your Outfitter and Object scale.

Tested on clean https://github.com/TrinityCore/TrinityCore/commit/3994286305e02423cdc47d14601ae92e1c637d16
Not stuck

Tested on https://github.com/Rochet2/TrinityCore/commit/e49bbe38280340d3a640b4c159689dae5ca84934
Not stuck

Tested on https://github.com/Rochet2/TrinityCore/commit/ef07d8bdab0ed30fd8c83aadf7b65032a74aee9d
Not stuck

How I tested:
On windows clone source, compile, drop DB, start compiled server and it creates DB, create account and log in, issue .server shutdown 5 inside the game.

You should try for example debugging to stop it while its halting and inspect where it is halting at or try disable all things you think cause the issue and test without everything and add them back in one at a time.
Maybe try to find out how to reproduce the issue.