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
538 changed files with 92888 additions and 91297 deletions

View File

@@ -59,7 +59,7 @@ public:
}
else
{
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
Creature* cr;
if ((cr = creature->SummonCreature(17957, -186, -790, 43.8f, 4.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
cr->AI()->AttackStart(creature);
@@ -96,13 +96,13 @@ public:
}
void EnterCombat(Unit*) override
{
_spoken = 2;
{
_spoken = 2;
}
uint32 GetData(uint32) const override
{
return _spoken == 2;
uint32 GetData(uint32) const override
{
return _spoken == 2;
}
};
@@ -149,10 +149,10 @@ public:
if (player->GetReputationRank(942) > REP_NEUTRAL)
{
if (creature->GetEntry() == NPC_ASHYEN)
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if (creature->GetEntry() == NPC_KELETH)
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
}
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
@@ -162,7 +162,7 @@ public:
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
ClearGossipMenuFor(player);
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
creature->setPowerType(POWER_MANA);
creature->SetMaxPower(POWER_MANA, 200); //set a "fake" mana value, we can't depend on database doing it in this case
@@ -172,7 +172,8 @@ public:
{
uint32 spell = 0;
switch (player->GetReputationRank(942))
{ //mark of lore
{
//mark of lore
case REP_FRIENDLY:
spell = SPELL_BLESS_ASH_FRI;
break;
@@ -276,7 +277,8 @@ public:
{
DoCastVictim(SPELL_LIGHTNING_BOLT);
LightningBolt_Timer = 5000;
} else LightningBolt_Timer -= diff;
}
else LightningBolt_Timer -= diff;
DoMeleeAttackIfReady();
}
@@ -346,22 +348,22 @@ public:
SendGossipMenuFor(player, 9229, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 2:
{
if (!player->HasItemCount(24573))
{
ItemPosCountVec dest;
uint32 itemId = 24573;
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1, nullptr);
if (msg == EQUIP_ERR_OK)
if (!player->HasItemCount(24573))
{
player->StoreNewItem(dest, itemId, true);
ItemPosCountVec dest;
uint32 itemId = 24573;
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1, nullptr);
if (msg == EQUIP_ERR_OK)
{
player->StoreNewItem(dest, itemId, true);
}
else
player->SendEquipError(msg, nullptr, nullptr, itemId);
}
else
player->SendEquipError(msg, nullptr, nullptr, itemId);
SendGossipMenuFor(player, 9231, creature->GetGUID());
break;
}
SendGossipMenuFor(player, 9231, creature->GetGUID());
break;
}
}
return true;
}