refactor(Core/Scripts): restyle scripts lib with astyle (#3467)

This commit is contained in:
Kargatum 2020-10-11 15:35:34 +07:00 committed by GitHub
parent 4cca286a4d
commit 5e20b46812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
538 changed files with 92888 additions and 91297 deletions

View file

@ -45,15 +45,15 @@ public:
//for special scripts
switch (itemId)
{
case 24538:
case 24538:
if (player->GetAreaId() != 3628)
disabled = true;
break;
case 34489:
case 34489:
if (player->GetZoneId() != 4080)
disabled = true;
break;
case 34475:
case 34475:
if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES))
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
break;
@ -82,10 +82,10 @@ public:
{
if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
{
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY() + 20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
nether->AI()->AttackStart(player);
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()-20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY() - 20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
nether->AI()->AttackStart(player);
}
return false;
@ -104,7 +104,7 @@ public:
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
{
if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT &&
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
return false;
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
@ -121,7 +121,7 @@ class item_incendiary_explosives : public ItemScript
public:
item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { }
bool OnUse(Player* player, Item* item, SpellCastTargets const & /*targets*/)
bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
{
if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15))
return false;
@ -189,7 +189,7 @@ class item_petrov_cluster_bombs : public ItemScript
public:
item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { }
bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/)
bool OnUse(Player* player, Item* item, const SpellCastTargets& /*targets*/)
{
if (player->GetZoneId() != ZONE_ID_HOWLING)
return false;