aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_01_19_00_world_creature_text.sql1
-rw-r--r--sql/updates/world/2013_01_19_01_world_creature_text.sql2
-rw-r--r--sql/updates/world/2013_01_19_02_world_conditions.sql3
-rw-r--r--sql/updates/world/2013_01_19_03_world_creature_text.sql1
-rw-r--r--sql/updates/world/2013_01_19_04_world_creature_addon.sql29
-rw-r--r--sql/updates/world/2013_01_19_04_world_creature_text.sql1
-rw-r--r--sql/updates/world/2013_01_19_05_world_creature_addon.sql2
-rw-r--r--sql/updates/world/2013_01_19_06_world_misc.sql14
-rw-r--r--src/server/game/DataStores/DBCStores.cpp13
-rw-r--r--src/server/game/DataStores/DBCStores.h2
-rw-r--r--src/server/game/DataStores/DBCStructure.h16
-rw-r--r--src/server/game/DataStores/DBCfmt.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp3
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp6
-rw-r--r--src/server/worldserver/RemoteAccess/RASocket.cpp2
16 files changed, 86 insertions, 13 deletions
diff --git a/sql/updates/world/2013_01_19_00_world_creature_text.sql b/sql/updates/world/2013_01_19_00_world_creature_text.sql
new file mode 100644
index 00000000000..ed52fe13b29
--- /dev/null
+++ b/sql/updates/world/2013_01_19_00_world_creature_text.sql
@@ -0,0 +1 @@
+UPDATE `creature_text` SET `sound`=5802 WHERE `entry`=4832 AND `groupid`=0;
diff --git a/sql/updates/world/2013_01_19_01_world_creature_text.sql b/sql/updates/world/2013_01_19_01_world_creature_text.sql
new file mode 100644
index 00000000000..4fb6bc55c87
--- /dev/null
+++ b/sql/updates/world/2013_01_19_01_world_creature_text.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_text` SET `text`='Just...Dust…',`sound`=5803 WHERE `entry`=4832 AND `groupid`=2;
+UPDATE `creature_text` SET `text`='Who dares disturb my meditation!' WHERE `entry`=4832 AND `groupid`=0;
diff --git a/sql/updates/world/2013_01_19_02_world_conditions.sql b/sql/updates/world/2013_01_19_02_world_conditions.sql
new file mode 100644
index 00000000000..744029f4fa0
--- /dev/null
+++ b/sql/updates/world/2013_01_19_02_world_conditions.sql
@@ -0,0 +1,3 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=35475;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 7, 35475, 0, 0, 27, 0, 80, 2, 0, 0, 0, 0, '', 'Drums of War - level restriction');
diff --git a/sql/updates/world/2013_01_19_03_world_creature_text.sql b/sql/updates/world/2013_01_19_03_world_creature_text.sql
new file mode 100644
index 00000000000..d9a15f4da7a
--- /dev/null
+++ b/sql/updates/world/2013_01_19_03_world_creature_text.sql
@@ -0,0 +1 @@
+UPDATE `creature_text` SET `text`='Just...Dust...' WHERE `entry`=4832 AND `groupid`=2;
diff --git a/sql/updates/world/2013_01_19_04_world_creature_addon.sql b/sql/updates/world/2013_01_19_04_world_creature_addon.sql
new file mode 100644
index 00000000000..fbe99d8edf2
--- /dev/null
+++ b/sql/updates/world/2013_01_19_04_world_creature_addon.sql
@@ -0,0 +1,29 @@
+UPDATE `creature_addon` SET `auras`='' WHERE `guid` IN (
+9785,9784,9771, -- Devotion Aura On Dragonmaw Swamprunner, Centurion, Bonewarder
+5056, -- Unholy Shield on Morbent Fel
+16707,16719,16733,16735,16737,16751,16754,16771,16796,16863,16962,16963,16987,17004,17005,17006,17010,17013,17017,17018,17021,17028, -- Stealth on Syndicate Spy
+16709,16880,16881,16882,16883,16901,16985,17031,17032,17044,17047,17048,17051,17097, -- Stealth on Syndicate Assassin
+11547,11550,11577,11608,11612,11654,11696,11812,11976,12904,12910,12912,13251,13303,13304,13310,13311,13313,13315, -- Stealth on Syndicate Highwayman
+14652, -- Shadow Channeling on Marez Cowl
+13594,13598, -- Defensive Stance on Bael'dun Excavator
+14055, -- Stealth on Mad Magglish
+33157,33158,33159,33160,33161,33162, -- Stealth on Felmusk Shadowstalker
+34187,34189,34191, -- Bear form on Cenarion Protector
+32349, -- Sleep visual on Relara Whitemoon
+40101,40087,40055,40050,40042,40030,40012,40001, -- Inner Fire on Scarlet Chaplain
+31208,31214,31360,31385,31387,31390,31391,31393,31463,31473,31607,31608,31617,31619,31622, -- Fire Shield on Fireman Scalebane
+81447,81446,81444,81440,43695,42624,42622,42607,42605, -- Demon Skin on Sandfury Shadowcaster
+91931,92324,92513,92665,92670,92671, -- Disease Cloud on Stiched Golem
+48477,48563,48585,48761,48765,48768,48769,48772,48809,48816,48818,48827,48832,48836,48837,48921,48922,48923,48924,48926,48983,48987,48993,48999,91411,91412,91415, -- Disease Cloud on Diseased Ghoul
+81927,81931,81940,81987,81995,82301,82316,82341,82355,82378,82394,82396,82397,82413,82426,82479,82510,82611,82612,82613,82615,82662,82763,82771, -- Draining Touch on Vampiric Mistbat
+61856,61928,61931,61940, -- Thorns on Barbed Crawler
+67462,67465,67468,67469, -- Arcane Shield on Warp Aberration
+74883, -- Freeze Anim on Legion Hold Fel Reaver
+132572, -- Shroud of Death on Time-Lost Skettis High Priest
+76348,76349,76351,76353,76355,76356,76358,76359,76360,76362,76363,76364,76365,76366,76368,76369,76370,76371,76372,76373,76374,76376, -- Ghostly Facade on Cleric of Karabor
+12803,12802,12801,12800,12799,12798, -- Lightning Shield on Ashtongue Stormcaller
+132849,132850,132852,132853,132855,132851,132854,132856,132857, -- Phasing Invisibility on Blackwind Warp Chaser
+32943, -- Cat form on Becanna Edune
+132863, -- Oil coat on Oil-Stained Wolf
+126539,126542,126553,126556,126562,126564,126567,126568,126569,126572,126574,126579,126582, -- Arcane Missiles on Crazed Mana-Wraith
+127067); -- Head Crack on Drakkari Earthhshaker
diff --git a/sql/updates/world/2013_01_19_04_world_creature_text.sql b/sql/updates/world/2013_01_19_04_world_creature_text.sql
new file mode 100644
index 00000000000..c14cf5c149a
--- /dev/null
+++ b/sql/updates/world/2013_01_19_04_world_creature_text.sql
@@ -0,0 +1 @@
+UPDATE `creature_text` SET `text`='Who dares disturb my meditation?' WHERE `entry`=4832 AND `groupid`=0;
diff --git a/sql/updates/world/2013_01_19_05_world_creature_addon.sql b/sql/updates/world/2013_01_19_05_world_creature_addon.sql
new file mode 100644
index 00000000000..0a384501e36
--- /dev/null
+++ b/sql/updates/world/2013_01_19_05_world_creature_addon.sql
@@ -0,0 +1,2 @@
+-- delete 31 creature_addon data that contain no information (bytes2=1 is the default)
+DELETE FROM `creature_addon` WHERE `guid` IN (132572,126539,126542,126553,126556,126562,126564,126567,126568,126569,126572,126574,126579,126582,127067,132849,132850,132851,132852,132853,132854,132855,132856,132857,132863,108034,108035,108036,108037,203372,203373);
diff --git a/sql/updates/world/2013_01_19_06_world_misc.sql b/sql/updates/world/2013_01_19_06_world_misc.sql
new file mode 100644
index 00000000000..55d9777a71c
--- /dev/null
+++ b/sql/updates/world/2013_01_19_06_world_misc.sql
@@ -0,0 +1,14 @@
+UPDATE `quest_template` SET `PrevQuestId`=12872 WHERE `Id` IN (12871,12885);
+UPDATE `quest_template` SET `PrevQuestId`=12928 WHERE `Id` IN (12929,13273);
+
+UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry` IN
+(188364,188501,188502,188503,186684,186390,186950,186954,186955,186912,186662,186618,186587,186595,186607,186938,187027,186427,187026,187022,187023,188702,188703,188705,189983,186632,186619,186591,186397,
+186640,186679,186828,186830,186832,186885,186886,187033,187381,187577,187683,187684,187685,187686,187687,187885,187886,188015,188016,188017,188066,188120,188462,188489,188646,188650,188658,188659,189288,
+189293,189295,189298,189306,190127,190189,190354,190483,190484,190578,190612,190613,190614,190623,190624,190625,190643,190696,190720,191179,191567,191814,191815,192058,192171,192172,192556,192676,192693,
+193091,193092,193196,193197,193404,193560,193561,193767,193792,193793,193943,193945,193946,194158,194159,194238,194340,194341,194423,194424,195022,195037,195274,195344,201367,201384,201794,201937);
+
+UPDATE `gameobject_template` SET `flags`=`flags`|16 WHERE `entry` IN
+(193603,193905,193967,194158,194159,195046,195047,195323,195324,195374,195375,195631,195632,195633,195635,195709,195710,201710,201959);
+
+UPDATE `gameobject_template` SET `faction`=94 WHERE `entry` IN (195046,195047,195631,195632,195633,195635);
+UPDATE `gameobject_template` SET `faction`=35 WHERE `entry` IN (201710,201959);
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 17135291664..c168f0e1acf 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -64,6 +64,7 @@ DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEnt
DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt);
DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt);
+std::map<uint32, CharStartOutfitEntry const*> sCharStartOutfitMap;
DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
@@ -335,6 +336,10 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sBattlemasterListStore, dbcPath, "BattlemasterList.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sBarberShopStyleStore, dbcPath, "BarberShopStyle.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");//14545
+ for (uint32 i = 0; i < sCharStartOutfitStore.GetNumRows(); ++i)
+ if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i))
+ sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit;
+
LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc");//14545
@@ -1039,6 +1044,14 @@ uint32 GetLiquidFlags(uint32 liquidType)
return 0;
}
+CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender)
+{
+ std::map<uint32, CharStartOutfitEntry const*>::const_iterator itr = sCharStartOutfitMap.find(race | (class_ << 8) | (gender << 16));
+ if (itr == sCharStartOutfitMap.end())
+ return NULL;
+
+ return itr->second;
+}
uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId)
{
return PowersByClass[classId][powerType];
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 9afd6096f81..60ab87a2876 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -73,6 +73,8 @@ uint32 GetLiquidFlags(uint32 liquidType);
PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
+CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender);
+
uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId);
extern DBCStorage <AchievementEntry> sAchievementStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 4ec6c9fbd08..82b0573d875 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -664,13 +664,15 @@ struct BattlemasterListEntry
struct CharStartOutfitEntry
{
//uint32 Id; // 0
- uint32 RaceClassGender; // 1 (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
- int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-13
- //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 14-25 not required at server side
- //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 26-37 not required at server side
- uint32 PetDisplayId; // 38 Pet Model ID for starting pet
- uint32 PetFamilyEntry; // 39 Pet Family Entry for starting pet
- //uint32 Unk[3]; // 40-42 Unknown
+ uint8 Race; // 1
+ uint8 Class; // 2
+ uint8 Gender; // 3
+ //uint8 Unused; // 4
+ int32 ItemId[MAX_OUTFIT_ITEMS]; // 5-28
+ //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 29-52 not required at server side
+ //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side
+ uint32 PetDisplayId; // 77 Pet Model ID for starting pet
+ uint32 PetFamilyEntry; // 78 Pet Family Entry for starting pet
};
struct CharTitlesEntry
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index cbbcb46bd08..9895378a218 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -35,7 +35,7 @@ char const AuctionHouseEntryfmt[] = "niiix";
char const BankBagSlotPricesEntryfmt[] = "ni";
char const BarberShopStyleEntryfmt[] = "nixxxiii";
char const BattlemasterListEntryfmt[] = "niiiiiiiiixsiiiixxxx";
-char const CharStartOutfitEntryfmt[] = "diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixxx";
+char const CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxii";
char const CharTitlesEntryfmt[] = "nxsxix";
char const ChatChannelsEntryfmt[] = "nixsx";
char const ChrClassesEntryfmt[] = "nixsxxxixiiiii";
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 8033c82f979..89cab7d5744 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1117,7 +1117,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
addActionButton(action_itr->button, action_itr->action, action_itr->type);
// original items
- if (CharStartOutfitEntry const* oEntry = sCharStartOutfitStore.LookupEntry(RaceClassGender))
+ if (CharStartOutfitEntry const* oEntry = GetCharStartOutfitEntry(createInfo->Race, createInfo->Class, createInfo->Gender))
{
for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j)
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 1916dd17c89..45859290d1f 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2834,10 +2834,9 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
if (count < -1)
sLog->outError(LOG_FILTER_SQL, "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
- uint32 RaceClass = (race_) | (class_ << 8);
for (uint32 gender = 0; gender < GENDER_NONE; ++gender)
{
- if (CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(RaceClass | (gender << 16)))
+ if (CharStartOutfitEntry const* entry = GetCharStartOutfitEntry(race_, class_, gender))
{
bool found = false;
for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x)
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index d111725a760..c1a4c5f70a3 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -103,7 +103,6 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T &owner)
return;
*/
-
D::_addUnitStateMove(owner);
i_targetReached = false;
i_recalculateTravel = false;
@@ -111,6 +110,11 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T &owner)
Movement::MoveSplineInit init(owner);
init.MoveTo(x, y, z);
init.SetWalk(((D*)this)->EnableWalking());
+ // Using the same condition for facing target as the one that is used for SetInFront on movement end
+ // - applies to ChaseMovementGenerator mostly
+ if (i_angle == 0.f)
+ init.SetFacing(i_target.getTarget());
+
init.Launch();
}
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index 95fdad9ad44..e0f4e7f0de6 100644
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -71,7 +71,7 @@ int RASocket::send(const std::string& line)
ssize_t n = peer().send(line.c_str(), line.length());
#endif // MSG_NOSIGNAL
- return n == line.length() ? 0 : -1;
+ return n == ssize_t(line.length()) ? 0 : -1;
}
int RASocket::recv_line(ACE_Message_Block& buffer)