Skip to content

Commit b6c2295

Browse files
committed
Squashed commit of the following:
commit 6f393e0 Author: ratkosrb <[email protected]> Date: Wed May 14 00:12:11 2025 +0300 Fix a crash. commit b94d61d Author: ratkosrb <[email protected]> Date: Tue May 13 13:06:51 2025 +0300 Correct attack speeds for some mobs. commit 2917fcf Author: ratkosrb <[email protected]> Date: Tue May 13 07:40:03 2025 +0300 More include cleanup. commit d6ca8e1 Author: ratkosrb <[email protected]> Date: Tue May 13 07:13:56 2025 +0300 Cleanup more includes. commit a7d022a Author: ratkosrb <[email protected]> Date: Tue May 13 05:08:46 2025 +0300 Reduce usage of ChatHandler. commit 775bda4 Author: ratkosrb <[email protected]> Date: Tue May 13 04:30:13 2025 +0300 Misc helpers for debugging. commit b9342d4 Author: ratkosrb <[email protected]> Date: Tue May 13 03:03:13 2025 +0300 Don't check damage origin for boss loot. Closes vmangos#2228 Closes vmangos#3028 commit b661ec6 Author: ratkosrb <[email protected]> Date: Mon May 12 12:24:40 2025 +0300 Improve chase movement against units moved by server. commit a0fa0ad Author: ratkosrb <[email protected]> Date: Mon May 12 09:26:13 2025 +0300 Try to fix build again. commit 7da3254 Author: ratkosrb <[email protected]> Date: Mon May 12 09:16:02 2025 +0300 Try to fix linux build. commit 8f8f09d Author: ratkosrb <[email protected]> Date: Mon May 12 08:16:50 2025 +0300 Separate chase and follow movement. commit 249bf76 Author: Gamemechanic <[email protected]> Date: Mon May 12 01:06:50 2025 +0200 Remove legacy mods.conf references (vmangos#3030) commit 0498b88 Author: ratkosrb <[email protected]> Date: Sat May 10 01:55:49 2025 +0300 Brother Sarno's greeting script should be assigned to the areatrigger. commit 3b4232c Author: ratkosrb <[email protected]> Date: Sat May 10 01:29:34 2025 +0300 Steeljaw Snappers were added in 1.3. commit af856a5 Author: Gamemechanic <[email protected]> Date: Fri May 9 23:40:55 2025 +0200 Reagent vendors in Feathermoon Stronghold and Camp Mojache were added in 1.3 (vmangos#3024) commit a6a074e Author: Gamemechanic <[email protected]> Date: Fri May 9 23:40:03 2025 +0200 Add Vector3::up() and ::down() constants (vmangos#3021) commit 7fd712a Author: ratkosrb <[email protected]> Date: Wed May 7 02:18:43 2025 +0300 Fix Dismiss Pet not decreasing happiness. cmangos/mangos-classic@9f42f59 commit 883a35d Author: ratkosrb <[email protected]> Date: Tue May 6 06:43:39 2025 +0300 Name some world enables flags. commit f01cfd8 Author: ratkosrb <[email protected]> Date: Tue May 6 05:36:32 2025 +0300 Implement Beastmaster mode. commit 3b03a2e Author: NickTyrer <[email protected]> Date: Mon May 5 13:31:18 2025 +0100 Add Missing Thorium / Truesilver Veins (credit cmangos) (vmangos#3027) commit d4f3834 Author: NickTyrer <[email protected]> Date: Mon May 5 13:26:41 2025 +0100 Add Missing Gold / Mithril / Truesilver Veins (credit cmangos) (vmangos#3026) commit f584b80 Author: NickTyrer <[email protected]> Date: Mon May 5 13:22:24 2025 +0100 Add Missing Silver / Gold / Iron Veins (credit cmangos) (vmangos#3025) commit 9f5283e Author: NickTyrer <[email protected]> Date: Mon May 5 13:18:04 2025 +0100 Add Missing Tin / Silver Veins (credit cmangos) (vmangos#3023) commit c45d1aa Author: NickTyrer <[email protected]> Date: Mon May 5 12:12:53 2025 +0100 Add Missing Copper Veins (vmangos#3022) commit 57c09af Author: ratkosrb <[email protected]> Date: Tue Apr 29 13:37:50 2025 +0300 Fix creatures being immune to spells that bypass immunities. commit 07c43c5 Author: Gamemechanic <[email protected]> Date: Tue Apr 29 02:18:15 2025 +0200 Cleanup CalculateForDebuffLimit (vmangos#3020) commit f1857ed Author: ratkosrb <[email protected]> Date: Tue Apr 29 03:12:24 2025 +0300 Remove obsolete check. commit eb4351f Author: ratkosrb <[email protected]> Date: Tue Apr 29 03:09:47 2025 +0300 Rework ignore caster and target restrictions attribute. commit 9789ec6 Author: Chero <[email protected]> Date: Tue Apr 29 02:31:31 2025 +0300 Self cast spells shouldn't miss. commit 296fbe0 Author: Chero <[email protected]> Date: Tue Apr 29 02:17:18 2025 +0300 Cancel immediately channeled spells that are about to fail due to no more valid targets. commit 354f3f5 Author: ratkosrb <[email protected]> Date: Tue Apr 29 00:14:10 2025 +0300 Fix character creation. commit 42df226 Author: ratkosrb <[email protected]> Date: Tue Apr 29 00:07:20 2025 +0300 Rename some unit flags. commit c53391e Author: ratkosrb <[email protected]> Date: Mon Apr 28 19:34:16 2025 +0300 Fixes for last commit. commit a7a48b4 Author: ratkosrb <[email protected]> Date: Mon Apr 28 18:51:02 2025 +0300 Implement character flags. TrinityCore/TrinityCore@1710036 commit 8f29214 Author: ratkosrb <[email protected]> Date: Sun Apr 27 13:18:44 2025 +0300 Fix Eye of Kilrogg crash. Closes vmangos#3014 commit 2dae0ef Author: ratkosrb <[email protected]> Date: Mon Apr 21 17:02:28 2025 +0300 Avoid copying the creature list in grid object updates. Will this cause a deadlock? Let's find out together. commit 279b8e6 Author: Gamemechanic <[email protected]> Date: Mon Apr 21 01:51:37 2025 +0200 Delete some TBC items wrongly retained in the database. (vmangos#3018) commit 596a13c Author: Nolin <[email protected]> Date: Mon Apr 21 00:00:21 2025 +0200 Use actual realm ID instead of hardcoded 0x2C in `LoadRealmlistAndWriteIntoBuffer` Thanks @0blu for debugging commit f6fd0f3 Author: ratkosrb <[email protected]> Date: Sun Apr 20 15:39:20 2025 +0300 Fix a typo. commit 8bfd1f5 Author: Gamemechanic <[email protected]> Date: Sat Apr 19 21:59:01 2025 +0200 Fix potential g3d assert with debug los check (vmangos#3017) commit 4591fce Author: Gamemechanic <[email protected]> Date: Sat Apr 19 15:01:23 2025 +0200 Realmd: Fix masking of login string if password is empty (vmangos#3016) commit d7ac872 Author: ratkosrb <[email protected]> Date: Sun Apr 13 20:21:44 2025 +0300 High Priest Rohan was not part of the Ironforge faction before 1.4. commit d8c5284 Author: ratkosrb <[email protected]> Date: Sun Apr 13 19:55:56 2025 +0300 Wandering Forest Walker should be elite before patch 1.8. Closes vmangos#3009 commit 2f1c626 Author: Wall <[email protected]> Date: Sun Apr 13 10:44:40 2025 -0400 Prevent crash in MoveMap.cpp (vmangos#3007) commit 7f256a6 Author: Gamemechanic <[email protected]> Date: Sun Apr 13 16:44:20 2025 +0200 Fixes for quest Cluck! (vmangos#3008) commit fdb5887 Author: Gamemechanic <[email protected]> Date: Sat Apr 12 19:54:20 2025 +0200 Fix potential memory leak when adding partybots (vmangos#3006) commit f4a971d Author: Chero <[email protected]> Date: Sat Apr 12 16:23:04 2025 +0300 Misc code fixes. commit f327c98 Author: FlagFlayer <[email protected]> Date: Fri Apr 11 19:29:44 2025 +0300 Implement evade on evade flag and correctly link adds for Faerlina (vmangos#3005) commit b0b0521 Author: ratkosrb <[email protected]> Date: Fri Apr 11 08:24:44 2025 +0300 Add waypoints for Dalaran Wizard. commit a441be4 Author: ratkosrb <[email protected]> Date: Thu Apr 10 21:06:17 2025 +0300 Make sure bots draw their weapons. Incorrect sheath state can prevent blocking in combat. commit f594f40 Author: ratkosrb <[email protected]> Date: Wed Apr 9 16:00:24 2025 +0300 Fix memory leak in send mail handler. Thanks to Giperion. commit 62e3921 Author: ratkosrb <[email protected]> Date: Tue Apr 8 16:42:07 2025 +0300 Remove Stormstrike hack. commit b959048 Author: ratkosrb <[email protected]> Date: Tue Apr 8 16:07:55 2025 +0300 Fix build. commit e893ab8 Author: ratkosrb <[email protected]> Date: Tue Apr 8 16:07:03 2025 +0300 Adding more spell scripts. commit f356ad5 Author: ratkosrb <[email protected]> Date: Tue Apr 8 11:51:52 2025 +0300 Forgot to assign a script. commit 52be095 Author: ratkosrb <[email protected]> Date: Tue Apr 8 10:33:28 2025 +0300 Add more spell scripts. commit ae25c33 Author: ratkosrb <[email protected]> Date: Mon Apr 7 13:31:17 2025 +0300 Fix build. commit 9b25344 Author: ratkosrb <[email protected]> Date: Mon Apr 7 11:16:02 2025 +0300 Fix build. commit 227d3e5 Author: ratkosrb <[email protected]> Date: Mon Apr 7 11:08:04 2025 +0300 Scripts for 2 other spells. commit 30e3353 Author: Chero <[email protected]> Date: Mon Apr 7 09:47:07 2025 +0300 Implement SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND and SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND. commit d598919 Author: ratkosrb <[email protected]> Date: Mon Apr 7 09:29:12 2025 +0300 Implement SPELL_FAILED_ALREADY_BEING_TAMED. commit 9bdbd33 Author: Gamemechanic <[email protected]> Date: Mon Apr 7 06:23:33 2025 +0200 Refactor Object::MovePositionToFirstCollision (vmangos#3000) commit d8034eb Author: ratkosrb <[email protected]> Date: Mon Apr 7 06:17:41 2025 +0300 Add more spell scripts. commit b4efb11 Author: ratkosrb <[email protected]> Date: Mon Apr 7 05:15:06 2025 +0300 Allow disabling effect execution completely in spell script. commit f21fd93 Author: ratkosrb <[email protected]> Date: Sun Apr 6 09:44:10 2025 +0300 Use unique names for player bots. commit 333cb9c Author: Daribon <[email protected]> Date: Sun Apr 6 06:31:58 2025 +0200 Add waypoints to Putridius. (vmangos#2912) commit 6edfaf6 Author: Daribon <[email protected]> Date: Sun Apr 6 06:30:55 2025 +0200 Correct Horde Guard waypoints. (vmangos#2911) commit 22ada9f Author: Daribon <[email protected]> Date: Sun Apr 6 06:28:28 2025 +0200 Add correct waypoints for Warsong Outrider. (vmangos#2891) commit 60c7f2d Author: Daribon <[email protected]> Date: Sun Apr 6 06:23:29 2025 +0200 Correct waypoints for Tenell Leafrunner. (vmangos#2890) commit 491191d Author: ratkosrb <[email protected]> Date: Sun Apr 6 07:16:32 2025 +0300 Name unknown field in SMSG_MAIL_LIST_RESULT. commit fb91fcc Author: schell244 <[email protected]> Date: Fri Apr 4 03:33:29 2025 +0200 Refactoring to Molten Core scripts (vmangos#2994) commit 116f709 Author: schell244 <[email protected]> Date: Sun Mar 30 20:32:39 2025 +0200 Remove unused bwl script (vmangos#2992) commit 185d8a4 Author: Stoabrogga <[email protected]> Date: Sun Mar 30 18:32:12 2025 +0000 Fix crash using command "wp modify del" (vmangos#2991) commit b189f77 Author: schell244 <[email protected]> Date: Sun Mar 30 03:10:02 2025 +0200 More BWL code cleanup (vmangos#2988) commit 9988684 Author: NickTyrer <[email protected]> Date: Fri Mar 28 17:30:34 2025 +0000 Add Missing Auras (vmangos#2985) commit c9020ec Author: Chaosvex <[email protected]> Date: Fri Mar 28 17:29:02 2025 +0000 Fix potential crash in GetBaseModValue() (vmangos#2990) modType comparison should be greater than or equal to, otherwise '2' is a valid value, which would would cause an out of bounds access of m_auraBaseMod. Both values are signed types and should therefore also be checked for any negative value. commit 340d88c Author: Chaosvex <[email protected]> Date: Fri Mar 28 16:58:51 2025 +0000 Fix memory leak in molten core script (vmangos#2989) Handle instance data strings the same way as most other instances commit de47994 Author: Chaosvex <[email protected]> Date: Thu Mar 27 20:15:16 2025 +0000 Don't perform multiple searches within instanceGroups (vmangos#2986) commit a434304 Author: schell244 <[email protected]> Date: Thu Mar 27 18:30:40 2025 +0100 BWL code cleanup (vmangos#2984) commit e57bc16 Author: David Skywalker <[email protected]> Date: Thu Mar 27 18:29:34 2025 +0100 Fix wrong name of loot logs config option. (vmangos#2983) commit c82dff0 Author: Stoabrogga <[email protected]> Date: Wed Mar 26 15:39:12 2025 +0000 Fix command "wp modify del" (vmangos#2981) commit fbc6fcb Author: ratkosrb <[email protected]> Date: Sun Mar 23 19:10:57 2025 +0200 Add spell scripts for more class dummy effects. commit b9f613f Author: ratkosrb <[email protected]> Date: Sun Mar 23 01:38:43 2025 +0200 Add db scripts support for areatriggers. commit 39452bb Author: Wall <[email protected]> Date: Sat Mar 22 13:19:56 2025 -0400 Fix sound assigned as emote in broadcast text (vmangos#2978) commit fdd8b09 Author: ratkosrb <[email protected]> Date: Sat Mar 22 18:01:04 2025 +0200 Add more missing gameobject spawns. Taken from 1.8 sniffs. commit 8a94be5 Author: Michael Serajnik <[email protected]> Date: Sat Mar 22 13:57:09 2025 +0100 CI: Improve database readiness check in workflows. (vmangos#2977) commit ec6aad3 Author: Michael Serajnik <[email protected]> Date: Sat Mar 22 05:05:41 2025 +0100 Unsummon pet when using the Tonk Control Console. (vmangos#2948) commit e831334 Author: schell244 <[email protected]> Date: Sat Mar 22 05:04:40 2025 +0100 Convert more script texts to broadcast texts. (vmangos#2975) commit 6d5cc14 Author: ratkosrb <[email protected]> Date: Sat Mar 22 05:47:25 2025 +0200 The command is not guaranteed to be a spell cast. commit f485dfa Author: ratkosrb <[email protected]> Date: Sat Mar 22 05:44:58 2025 +0200 Add spell list for Plague Ghoul. commit 7ebe790 Author: schell244 <[email protected]> Date: Fri Mar 21 18:33:05 2025 +0100 Rework Garr script. (vmangos#2971) commit cb2349c Author: ratkosrb <[email protected]> Date: Thu Mar 20 17:13:22 2025 +0200 Don't target dead initial puller in C'Thun script. commit 15e8b22 Author: ratkosrb <[email protected]> Date: Thu Mar 20 17:06:10 2025 +0200 Move Crimson Bodyguard spells to spell list. commit 61ab759 Author: Wall <[email protected]> Date: Thu Mar 20 10:17:31 2025 -0400 Update Majordomo Pre-Ragnaros Sequence (vmangos#2974) commit 56e4534 Author: ratkosrb <[email protected]> Date: Thu Mar 20 05:26:15 2025 +0200 Add names to areatriggers. commit e387833 Author: ratkosrb <[email protected]> Date: Wed Mar 19 19:34:15 2025 +0200 Changes to ScriptTarget enum. I don't like it being out of order. commit ef7cc4a Author: balakethelock <[email protected]> Date: Wed Mar 19 17:36:12 2025 +0100 Add target_type for target furthest enemy in spell casting AI (vmangos#2352) commit 429ccdb Author: Stoabrogga <[email protected]> Date: Tue Mar 18 22:44:46 2025 +0000 Fix command "wp add" (vmangos#2930) commit 9eaa668 Author: schell244 <[email protected]> Date: Tue Mar 18 15:29:59 2025 +0100 Cleanup of AQ40 scripts. (vmangos#2966) commit b6b7e26 Author: Wall <[email protected]> Date: Wed Mar 12 19:02:40 2025 -0400 Improvements for Garr and Majordomo scripts. (vmangos#2964) commit f65037a Author: schell244 <[email protected]> Date: Wed Mar 12 23:29:29 2025 +0100 Fix Majordomo being invincibile after intro (vmangos#2965) commit 61e5218 Author: schell244 <[email protected]> Date: Wed Mar 12 22:42:44 2025 +0100 Convert more script texts, add missing sounds (vmangos#2962) commit d3a6543 Author: Daribon <[email protected]> Date: Wed Mar 12 20:43:52 2025 +0100 Remove unused xpac texts from script_texts. (vmangos#2963) commit 397a661 Author: Wall <[email protected]> Date: Wed Mar 12 14:02:10 2025 -0400 Update Majordomo Executus script. (vmangos#2961) commit c013a95 Author: FlagFlayer <[email protected]> Date: Tue Mar 11 14:57:21 2025 +0200 Check Item Level for Heavy Armor Kit after Patch 1.7 (vmangos#2954) commit b9ba6ce Author: Michael Serajnik <[email protected]> Date: Tue Mar 11 13:53:17 2025 +0100 Fix 1.6.1.4544 build. (vmangos#2960) commit 0c63f28 Author: ratkosrb <[email protected]> Date: Tue Mar 11 00:54:24 2025 +0200 Fix some world texts. commit 680d1ae Merge: bcd225f dca1927 Author: ratkosrb <[email protected]> Date: Mon Mar 10 23:59:43 2025 +0200 Merge pull request vmangos#2959 from Wall-core/development Add enums and update hardcoded script texts commit bcd225f Author: Chero <[email protected]> Date: Mon Mar 10 23:53:18 2025 +0200 Prevent casting melee spells on far away units. thanks superwow commit dca1927 Author: Wall <[email protected]> Date: Mon Mar 10 17:42:02 2025 -0400 Add enums and update hardcoded script texts commit 07dbcee Merge: 8dc3d45 75a7778 Author: ratkosrb <[email protected]> Date: Mon Mar 10 22:51:13 2025 +0200 Merge pull request vmangos#2957 from Wall-core/development Update scripts to use broadcast_text commit 75a7778 Author: Wall <[email protected]> Date: Mon Mar 10 15:59:12 2025 -0400 Update scripts to use broadcast_text
1 parent 179eab1 commit b6c2295

262 files changed

Lines changed: 10108 additions & 5470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/db_check.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,19 @@ jobs:
2525
sudo docker pull mysql
2626
sudo docker run --name mysqldb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.6 --max_allowed_packet=128M
2727
sudo docker start mysqldb
28-
until nc -z localhost 3306 ; do sleep 5 ; echo "Waiting for database availability..." ; done
29-
28+
echo "Waiting for database availability..."
29+
max_attempts=30
30+
attempt=0
31+
until docker exec mysqldb mysqladmin -u root -proot ping --silent &> /dev/null; do
32+
attempt=$((attempt+1))
33+
if [ $attempt -gt $max_attempts ]; then
34+
echo "Database failed to become ready in time!"
35+
exit 1
36+
fi
37+
echo "Waiting for database to be ready... (attempt $attempt/$max_attempts)"
38+
sleep 5
39+
done
40+
echo "Database is ready!"
3041
3142
- name: Checkout update sql
3243
uses: actions/checkout@v4

.github/workflows/db_dump.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,19 @@ jobs:
2828
sudo docker pull mysql
2929
sudo docker run --name mysqldb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.6 --max_allowed_packet=128M
3030
sudo docker start mysqldb
31-
until nc -z localhost 3306 ; do sleep 5 ; echo "Waiting for database availability..." ; done
32-
31+
echo "Waiting for database availability..."
32+
max_attempts=30
33+
attempt=0
34+
until docker exec mysqldb mysqladmin -u root -proot ping --silent &> /dev/null; do
35+
attempt=$((attempt+1))
36+
if [ $attempt -gt $max_attempts ]; then
37+
echo "Database failed to become ready in time!"
38+
exit 1
39+
fi
40+
echo "Waiting for database to be ready... (attempt $attempt/$max_attempts)"
41+
sleep 5
42+
done
43+
echo "Database is ready!"
3344
3445
- name: Checkout update sql
3546
uses: actions/checkout@v4

contrib/mmap/src/TerrainBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,7 @@ namespace MMAP
750750

751751
/// Check every map vertice
752752
// x, y * -1
753-
Vector3 up(0, 0, 1);
754-
753+
755754
for (vector<GroupModel>::iterator it = groupModels.begin(); it != groupModels.end(); ++it)
756755
for (int t = 0; t < mapVertsCount / 3; ++t)
757756
{
@@ -764,7 +763,7 @@ namespace MMAP
764763

765764
float outDist = -1.0f;
766765
float inDist = -1.0f;
767-
if (it->IsUnderObject(v, up, isM2, &outDist, &inDist)) // inDist < outDist
766+
if (it->IsUnderObject(v, Vector3::up(), isM2, &outDist, &inDist)) // inDist < outDist
768767
{
769768
//if there are less than 5.0y between terrain and model then mark the terrain as unwalkable
770769
if (inDist < 5.0f)

dep/include/g3dlite/G3D/Vector3.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,13 @@ class Vector3 {
236236
*/
237237
inline Vector3 directionOrZero() const {
238238
float mag = magnitude();
239-
if (mag < 0.0000001f) {
239+
if (mag < 0.0000001f)
240240
return Vector3::zero();
241-
} else if (mag < 1.00001f && mag > 0.99999f) {
241+
if (mag < 1.00001f && mag > 0.99999f)
242242
return *this;
243-
} else {
244-
return *this * (1.0f / mag);
245-
}
243+
244+
return *this * (1.0f / mag);
245+
246246
}
247247

248248
/**
@@ -424,6 +424,8 @@ class Vector3 {
424424
static const Vector3& unitZ();
425425
static const Vector3& inf();
426426
static const Vector3& nan();
427+
static const Vector3& up();
428+
static const Vector3& down();
427429

428430
/** Smallest (most negative) representable vector */
429431
static const Vector3& minFinite();
@@ -597,7 +599,7 @@ std::ostream& operator<<(std::ostream& os, const Vector3&);
597599

598600

599601
void serialize(const Vector3::Axis& a, class BinaryOutput& bo);
600-
void deserialize(Vector3::Axis& a, class BinaryInput& bo);
602+
void deserialize(Vector3::Axis& a, class BinaryInput& bi);
601603

602604

603605
//----------------------------------------------------------------------------

dep/src/g3dlite/Vector3.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Any Vector3::toAny(const std::string& name) const {
102102
return any;
103103
}
104104

105-
Vector3::Vector3(const class Color3& v) : x(v.r), y(v.g), z(v.b) {}
105+
Vector3::Vector3(const class Color3& c) : x(c.r), y(c.g), z(c.b) {}
106106

107107
Vector3::Vector3(const class Vector3int32& v) : x((float)v.x), y((float)v.y), z((float)v.z) {}
108108

@@ -116,11 +116,13 @@ Vector3& Vector3::ignore() {
116116
return v;
117117
}
118118

119-
const Vector3& Vector3::zero() { static const Vector3 v(0, 0, 0); return v; }
119+
const Vector3& Vector3::zero() { static const Vector3 v(0, 0, 0); return v; }
120120
const Vector3& Vector3::one() { static const Vector3 v(1, 1, 1); return v; }
121121
const Vector3& Vector3::unitX() { static const Vector3 v(1, 0, 0); return v; }
122122
const Vector3& Vector3::unitY() { static const Vector3 v(0, 1, 0); return v; }
123123
const Vector3& Vector3::unitZ() { static const Vector3 v(0, 0, 1); return v; }
124+
const Vector3& Vector3::up() { return unitZ(); }
125+
const Vector3& Vector3::down() { static const Vector3 v(0, 0, -1); return v; }
124126
const Vector3& Vector3::inf() { static const Vector3 v((float)G3D::finf(), (float)G3D::finf(), (float)G3D::finf()); return v; }
125127
const Vector3& Vector3::nan() { static const Vector3 v((float)G3D::fnan(), (float)G3D::fnan(), (float)G3D::fnan()); return v; }
126128
const Vector3& Vector3::minFinite(){ static const Vector3 v(-FLT_MAX, -FLT_MAX, -FLT_MAX); return v; }
@@ -303,11 +305,11 @@ Vector3 Vector3::cosPowHemiRandom(const Vector3& normal, const float k, Random&
303305
Vector3 Vector3::hemiRandom(const Vector3& normal, Random& r) {
304306
const Vector3& V = Vector3::random(r);
305307

306-
if (V.dot(normal) < 0) {
308+
if (V.dot(normal) < 0)
307309
return -V;
308-
} else {
309-
return V;
310-
}
310+
311+
return V;
312+
311313
}
312314

313315
//----------------------------------------------------------------------------
@@ -345,12 +347,14 @@ Vector3 Vector3::refractionDirection(
345347

346348
float det = 1.0f - (float)square(hRatio) * (1.0f - (float)square(WdotN));
347349

348-
if (det < 0) {
350+
if (det < 0)
351+
{
349352
// Total internal reflection
350353
return Vector3::zero();
351-
} else {
352-
return -hRatio * (W - WdotN * N) - N * sqrt(det);
353354
}
355+
356+
return -hRatio * (W - WdotN * N) - N * sqrt(det);
357+
354358
}
355359

356360
//----------------------------------------------------------------------------
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
DROP PROCEDURE IF EXISTS add_migration;
2+
delimiter ??
3+
CREATE PROCEDURE `add_migration`()
4+
BEGIN
5+
DECLARE v INT DEFAULT 1;
6+
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20231215165730');
7+
IF v=0 THEN
8+
INSERT INTO `migrations` VALUES ('20231215165730');
9+
-- Add your query below.
10+
11+
-- 500: Distance Between Targets Is Equal Or Greater Than 8 Yards
12+
INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (500, 38, 8, 1, 0, 0, 0);
13+
14+
-- Removing unused creature spell lists for Venom Stalker
15+
DELETE FROM `creature_spells` WHERE `entry`=159760;
16+
UPDATE `creature_template` SET `spell_list_id`=0 WHERE `entry`=15976;
17+
18+
-- Events list for Venom Stalker
19+
DELETE FROM `creature_ai_events` WHERE `creature_id`=15976;
20+
INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1597601, 15976, 0, 0, 0, 100, 1, 5000, 15000, 28000, 32000, 1597601, 0, 0, 'Venom Stalker - Cast Poison Charge');
21+
DELETE FROM `creature_ai_scripts` WHERE `id`=1597601;
22+
INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
23+
(1597601, 0, 0, 15, 28431, 0, 0, 0, 1, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 'Venom Stalker - Cast Poison Charge');
24+
UPDATE `creature_template` SET `ai_name`='EventAI' WHERE `entry`=15976;
25+
26+
-- Removing unused creature spell lists for Necro Stalker
27+
DELETE FROM `creature_spells` WHERE `entry`=164530;
28+
UPDATE `creature_template` SET `spell_list_id`=0 WHERE `entry`=16453;
29+
30+
-- Events list for Necro Stalker
31+
DELETE FROM `creature_ai_events` WHERE `creature_id`=16453;
32+
INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1645301, 16453, 0, 0, 0, 100, 1, 5000, 15000, 28000, 32000, 1645301, 0, 0, 'Necro Stalker - Cast Poison Charge');
33+
DELETE FROM `creature_ai_scripts` WHERE `id`=1645301;
34+
INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES
35+
(1645301, 0, 0, 15, 28431, 0, 0, 0, 1, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 'Necro Stalker - Cast Poison Charge');
36+
UPDATE `creature_template` SET `ai_name`='EventAI' WHERE `entry`=16453;
37+
38+
39+
40+
-- End of migration.
41+
END IF;
42+
END??
43+
delimiter ;
44+
CALL add_migration();
45+
DROP PROCEDURE IF EXISTS add_migration;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
DROP PROCEDURE IF EXISTS add_migration;
2+
DELIMITER ??
3+
CREATE PROCEDURE `add_migration`()
4+
BEGIN
5+
DECLARE v INT DEFAULT 1;
6+
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20250205213703');
7+
IF v = 0 THEN
8+
INSERT INTO `migrations` VALUES ('20250205213703');
9+
-- Add your query below.
10+
11+
12+
-- Pathing for Tenell Leafrunner Entry: 10923
13+
SET @NPC := 39102;
14+
UPDATE `creature` SET `wander_distance`=0,`movement_type`=2,`position_x`=3909.6858,`position_y`=-1266.3507,`position_z`=223.739 WHERE `guid`=@NPC;
15+
DELETE FROM `creature_movement` WHERE `id`=@NPC;
16+
INSERT INTO `creature_movement` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`waittime`,`wander_distance`,`script_id`) VALUES
17+
(@NPC,1,3909.6858,-1266.3507,223.739,100,500,0,0),
18+
(@NPC,2,3916.3025,-1269.1881,223.80756,100,0,0,0),
19+
(@NPC,3,3928.731,-1274.601,225.03976,100,0,0,0),
20+
(@NPC,4,3938.7578,-1280.9681,226.99359,100,0,0,0),
21+
(@NPC,5,3947.347,-1284.8043,229.73364,100,0,0,0),
22+
(@NPC,6,3955.0986,-1285.6556,232.99527,100,0,0,0),
23+
(@NPC,7,3961.6082,-1286.5798,236.43521,100,0,0,0),
24+
(@NPC,8,3967.5051,-1289.9736,239.88536,100,0,0,0),
25+
(@NPC,9,3972.9426,-1293.2542,243.07068,100,500,0,0),
26+
(@NPC,10,3967.5051,-1289.9736,239.88536,100,0,0,0),
27+
(@NPC,11,3961.6082,-1286.5798,236.43521,100,0,0,0),
28+
(@NPC,12,3955.0986,-1285.6556,232.99527,100,0,0,0),
29+
(@NPC,13,3947.347,-1284.8043,229.73364,100,0,0,0),
30+
(@NPC,14,3938.7578,-1280.9681,226.99359,100,0,0,0),
31+
(@NPC,15,3928.731,-1274.601,225.03976,100,0,0,0),
32+
(@NPC,16,3916.3025,-1269.1881,223.80756,100,0,0,0);
33+
-- 0x20566000200AAAC000004D000052F217 .go xyz 3909.6858 -1266.3507 223.739
34+
35+
36+
-- End of migration.
37+
END IF;
38+
END??
39+
DELIMITER ;
40+
CALL add_migration();
41+
DROP PROCEDURE IF EXISTS add_migration;
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
DROP PROCEDURE IF EXISTS add_migration;
2+
DELIMITER ??
3+
CREATE PROCEDURE `add_migration`()
4+
BEGIN
5+
DECLARE v INT DEFAULT 1;
6+
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20250205220436');
7+
IF v = 0 THEN
8+
INSERT INTO `migrations` VALUES ('20250205220436');
9+
-- Add your query below.
10+
11+
12+
-- Pathing for Warsong Outrider Entry: 12864
13+
SET @NPC := 52348;
14+
UPDATE `creature` SET `wander_distance`=0,`movement_type`=2,`position_x`=2526.8582,`position_y`=-2817.9739,`position_z`=158.47528 WHERE `guid`=@NPC;
15+
DELETE FROM `creature_movement` WHERE `id`=@NPC;
16+
INSERT INTO `creature_movement` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`waittime`,`wander_distance`,`script_id`) VALUES
17+
(@NPC,1,2526.8582,-2817.9739,158.47528,100,500,0,0),
18+
(@NPC,2,2540.766,-2842.0305,158.76918,100,0,0,0),
19+
(@NPC,3,2545.9739,-2881.4832,159.93704,100,0,0,0),
20+
(@NPC,4,2547.2024,-2909.2507,160.65646,100,0,0,0),
21+
(@NPC,5,2561.121,-2944.6003,160.71104,100,0,0,0),
22+
(@NPC,6,2570.664,-2966.118,160.94241,100,0,0,0),
23+
(@NPC,7,2583.3774,-2983.5793,161.02318,100,0,0,0),
24+
(@NPC,8,2606.161,-3008.301,161.01553,100,0,0,0),
25+
(@NPC,9,2628.309,-3032.5183,160.96677,100,0,0,0),
26+
(@NPC,10,2644.6921,-3052.551,160.94405,100,0,0,0),
27+
(@NPC,11,2670.138,-3084.3665,160.54523,100,0,0,0),
28+
(@NPC,12,2691.5747,-3118.9158,158.34998,100,0,0,0),
29+
(@NPC,13,2709.9124,-3162.228,155.40817,100,0,0,0),
30+
(@NPC,14,2724.1768,-3196.505,150.26207,100,0,0,0),
31+
(@NPC,15,2731.0337,-3234.6477,143.83606,100,0,0,0),
32+
(@NPC,16,2735.6064,-3260.1433,139.50423,100,0,0,0),
33+
(@NPC,17,2739.5166,-3287.8691,134.18207,100,0,0,0),
34+
(@NPC,18,2751.0486,-3332.722,128.75993,100,0,0,0),
35+
(@NPC,19,2765.7734,-3372.0156,125.371155,100,0,0,0),
36+
(@NPC,20,2783.2122,-3405.1013,118.3583,100,0,0,0),
37+
(@NPC,21,2804.1604,-3432.5493,114.457634,100,0,0,0),
38+
(@NPC,22,2832.3386,-3471.6987,111.19728,100,0,0,0),
39+
(@NPC,23,2855.4336,-3502.9731,106.7065,100,0,0,0),
40+
(@NPC,24,2875.1675,-3536.3335,102.57702,100,0,0,0),
41+
(@NPC,25,2889.254,-3572.0205,98.290695,100,0,0,0),
42+
(@NPC,26,2888.6672,-3611.5266,95.19931,100,0,0,0),
43+
(@NPC,27,2885.1162,-3647.2708,94.62988,100,0,0,0),
44+
(@NPC,28,2877.6182,-3677.461,93.44174,100,0,0,0),
45+
(@NPC,29,2864.4346,-3710.9297,89.09955,100,0,0,0),
46+
(@NPC,30,2841.7183,-3754.8047,82.044014,100,500,0,0),
47+
(@NPC,31,2864.3906,-3711.0808,89.11301,100,0,0,0),
48+
(@NPC,32,2877.6182,-3677.461,93.44174,100,0,0,0),
49+
(@NPC,33,2885.1162,-3647.2708,94.62988,100,0,0,0),
50+
(@NPC,34,2888.6672,-3611.5266,95.19931,100,0,0,0),
51+
(@NPC,35,2889.254,-3572.0205,98.290695,100,0,0,0),
52+
(@NPC,36,2875.1675,-3536.3335,102.57702,100,0,0,0),
53+
(@NPC,37,2855.4336,-3502.9731,106.7065,100,0,0,0),
54+
(@NPC,38,2832.3386,-3471.6987,111.19728,100,0,0,0),
55+
(@NPC,39,2804.1604,-3432.5493,114.457634,100,0,0,0),
56+
(@NPC,40,2783.2122,-3405.1013,118.3583,100,0,0,0),
57+
(@NPC,41,2765.8293,-3372.1438,125.43472,100,0,0,0),
58+
(@NPC,42,2751.1045,-3332.8516,128.70139,100,0,0,0),
59+
(@NPC,43,2739.5354,-3287.977,134.21512,100,0,0,0),
60+
(@NPC,44,2735.625,-3260.25,139.58159,100,0,0,0),
61+
(@NPC,45,2731.0337,-3234.6477,143.83606,100,0,0,0),
62+
(@NPC,46,2724.1768,-3196.505,150.26207,100,0,0,0),
63+
(@NPC,47,2709.9766,-3162.3242,155.43712,100,0,0,0),
64+
(@NPC,48,2691.5747,-3118.9158,158.34998,100,0,0,0),
65+
(@NPC,49,2670.138,-3084.3665,160.54523,100,0,0,0),
66+
(@NPC,50,2644.6921,-3052.551,160.94405,100,0,0,0),
67+
(@NPC,51,2628.309,-3032.5183,160.96677,100,0,0,0),
68+
(@NPC,52,2606.161,-3008.301,161.01553,100,0,0,0),
69+
(@NPC,53,2583.3774,-2983.5793,161.02318,100,0,0,0),
70+
(@NPC,54,2570.664,-2966.118,160.94241,100,0,0,0),
71+
(@NPC,55,2561.121,-2944.6003,160.71104,100,0,0,0),
72+
(@NPC,56,2547.2024,-2909.2507,160.65646,100,0,0,0),
73+
(@NPC,57,2545.9739,-2881.4832,159.93704,100,0,0,0),
74+
(@NPC,58,2540.766,-2842.0305,158.76918,100,0,0,0);
75+
-- 0x20566000200C9000000051000052F218 .go xyz 2526.8582 -2817.9739 158.47528
76+
77+
78+
-- End of migration.
79+
END IF;
80+
END??
81+
DELIMITER ;
82+
CALL add_migration();
83+
DROP PROCEDURE IF EXISTS add_migration;

0 commit comments

Comments
 (0)