aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorGyx <2359980687@qq.com>2012-03-28 11:13:37 +0800
committerGyx <2359980687@qq.com>2012-03-28 11:13:37 +0800
commite050945c91f6ff5764b336df790198b59323e65e (patch)
treee722796be35bb4b460c696c824683ae105ef3360 /src/server/scripts/EasternKingdoms
parent63c4d2b96eda0f7f3e7fba2a6a009b52be01cbbd (diff)
Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp3
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp4
6 files changed, 11 insertions, 10 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 4e04284354e..9d863544c24 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -203,16 +203,16 @@ public:
pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
float angle = me->GetAngle(pAttumen);
float distance = me->GetDistance2d(pAttumen);
- float newX = me->GetPositionX() + cos(angle)*(distance/2) ;
- float newY = me->GetPositionY() + sin(angle)*(distance/2) ;
+ float newX = me->GetPositionX() + cos(angle)*(distance/2);
+ float newY = me->GetPositionY() + sin(angle)*(distance/2);
float newZ = 50;
//me->Relocate(newX, newY, newZ, angle);
//me->SendMonsterMove(newX, newY, newZ, 0, true, 1000);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
distance += 10;
- newX = me->GetPositionX() + cos(angle)*(distance/2) ;
- newY = me->GetPositionY() + sin(angle)*(distance/2) ;
+ newX = me->GetPositionX() + cos(angle)*(distance/2);
+ newY = me->GetPositionY() + sin(angle)*(distance/2);
pAttumen->GetMotionMaster()->Clear();
pAttumen->GetMotionMaster()->MovePoint(0, newX, newY, newZ);
//pAttumen->Relocate(newX, newY, newZ, -angle);
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index 447703aa5a7..65fb6759722 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -201,7 +201,7 @@ public:
void DeSpawnAdds()
{
- for (uint8 i = 0; i < 4 ; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature* Temp = NULL;
if (AddGUID[i])
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 8918bca637e..6f71b100bb7 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1011,8 +1011,7 @@ public:
if (fLichPositionX && fLichPositionY)
{
- Unit* temp;
- temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
+ Unit* temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%10, LightofDawnLoc[0].y+rand()%10, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index fa0627df5f3..269c6fa0923 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -301,7 +301,7 @@ class boss_hexlord_malacrass : public CreatureScript
me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(me, SOUND_YELL_DEATH);
- for (uint8 i = 0; i < 4 ; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* Temp = Unit::GetUnit((*me), AddGUID[i]);
if (Temp && Temp->isAlive())
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
index f9fdd3a9587..06448032dff 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
@@ -198,7 +198,7 @@ class boss_venoxis : public CreatureScript
case EVENT_HOLY_NOVA:
_inMeleeRange = 0;
- for (uint8 i = 0; i < 10 ; ++i)
+ for (uint8 i = 0; i < 10; ++i)
{
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, i))
// check if target is within melee-distance
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index f36f5b5950e..921e19039da 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -85,6 +85,7 @@ public:
{
if (creature->isQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
+
if (creature->isVendor())
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
@@ -95,7 +96,8 @@ public:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->SEND_GOSSIP_MENU(3985, creature->GetGUID());
- }else
+ }
+ else
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;