Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My custom changes #6

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/Utilities/TaskScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TC_COMMON_API TaskScheduler
// Order tasks by its end
std::weak_ordering operator<=> (Task const& other) const
{
return _end <=> other._end;
return std::compare_weak_order_fallback(_end, other._end);
}

// Compare tasks with its end
Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Entities/Creature/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,9 @@ void Creature::setDeathState(DeathState s)

Motion_Initialize();
Unit::setDeathState(ALIVE);
LoadCreaturesAddon();

if (!IsPet())
LoadCreaturesAddon();
}
}

Expand Down
1 change: 0 additions & 1 deletion src/server/game/Entities/Pet/Pet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,6 @@ bool Pet::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, uint32
SetPhaseMask(phaseMask, false);
Object::_Create(guidlow, petId, HighGuid::Pet);

m_spawnId = guidlow;
m_originalEntry = Entry;

if (!InitEntry(Entry))
Expand Down
4 changes: 4 additions & 0 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12053,6 +12053,10 @@ InventoryResult Player::CanUseAmmo(uint32 item) const
if (HasAura(46699))
return EQUIP_ERR_BAG_FULL6;

// Requires No Ammo
if (HasAura(81101))
return EQUIP_ERR_BAG_FULL6;

return EQUIP_ERR_OK;
}
return EQUIP_ERR_ITEM_NOT_FOUND;
Expand Down
4 changes: 4 additions & 0 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4494,6 +4494,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use
break;
case 81101: // Requires No Ammo
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveAmmo(); // not use ammo and not allow use
break;
}
}
// AT REMOVE
Expand Down
5 changes: 5 additions & 0 deletions src/server/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4494,6 +4494,11 @@ void Spell::UpdateSpellCastDataAmmo(WorldPackets::Spells::SpellAmmo& ammo)
ammoDisplayID = 5996; // normal arrow
ammoInventoryType = INVTYPE_AMMO;
}
else if (m_caster->ToPlayer()->HasAura(81101)) // Requires No Ammo
{
ammoDisplayID = 5996; // normal arrow
ammoInventoryType = INVTYPE_AMMO;
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/server/game/Spells/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3474,6 +3474,12 @@ void SpellMgr::LoadSpellInfoCorrections()
65917, // Magic Rooster
71342, // Big Love Rocket
72286, // Invincible
80933, // Bunny Mount
80938, // FOX Mount
80943, // HAND Mount
80990, // Blue Phönix
80995, // Orange Phönix
81000, // Katzenmount
74856, // Blazing Hippogryph
75614, // Celestial Steed
75973 // X-53 Touring Rocket
Expand Down Expand Up @@ -4957,6 +4963,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(5); // 40yd
});

// CUSTOM: DK BOSS SCOURGE AURA
ApplySpellFix({ 60023 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx &= ~SPELL_ATTR1_CANT_TARGET_SELF;
});

for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
Expand Down
42 changes: 42 additions & 0 deletions src/server/scripts/Spells/spell_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,42 @@ enum Mounts
SPELL_INVINCIBLE_100 = 72282,
SPELL_INVINCIBLE_150 = 72283,
SPELL_INVINCIBLE_310 = 72284,

// Bunny Mount
SPELL_BUNNY_60 = 80929,
SPELL_BUNNY_100 = 80930,
SPELL_BUNNY_150 = 80931,
SPELL_BUNNY_310 = 80932,

// Blauer Phönix
SPELL_PHOENIX_A_60 = 80986,
SPELL_PHOENIX_A_100 = 80987,
SPELL_PHOENIX_A_150 = 80988,
SPELL_PHOENIX_A_310 = 80989,

// Oranger Phönix
SPELL_PHOENIX_B_60 = 80991,
SPELL_PHOENIX_B_100 = 80992,
SPELL_PHOENIX_B_150 = 80993,
SPELL_PHOENIX_B_310 = 80994,

// Katzenmount Phönix
SPELL_CATMOUNT_60 = 80996,
SPELL_CATMOUNT_100 = 80997,
SPELL_CATMOUNT_150 = 80998,
SPELL_CATMOUNT_310 = 80999,

// Fox Mount
SPELL_FOX_60 = 80934,
SPELL_FOX_100 = 80935,
SPELL_FOX_150 = 80936,
SPELL_FOX_310 = 80937,

// Hand Mount
SPELL_HAND_60 = 80939,
SPELL_HAND_100 = 80940,
SPELL_HAND_150 = 80941,
SPELL_HAND_310 = 80942,

// Blazing Hippogryph
SPELL_BLAZING_HIPPOGRYPH_150 = 74854,
Expand Down Expand Up @@ -4677,6 +4713,12 @@ void AddSC_generic_spell_scripts()
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_big_blizzard_bear", 0, SPELL_BIG_BLIZZARD_BEAR_60, SPELL_BIG_BLIZZARD_BEAR_100);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_big_love_rocket", SPELL_BIG_LOVE_ROCKET_0, SPELL_BIG_LOVE_ROCKET_60, SPELL_BIG_LOVE_ROCKET_100, SPELL_BIG_LOVE_ROCKET_150, SPELL_BIG_LOVE_ROCKET_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_invincible", 0, SPELL_INVINCIBLE_60, SPELL_INVINCIBLE_100, SPELL_INVINCIBLE_150, SPELL_INVINCIBLE_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_bunny", 0, SPELL_BUNNY_60, SPELL_BUNNY_100, SPELL_BUNNY_150, SPELL_BUNNY_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_phoenix_a", 0, SPELL_PHOENIX_A_60, SPELL_PHOENIX_A_100, SPELL_PHOENIX_A_150, SPELL_PHOENIX_A_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_phoenix_b", 0, SPELL_PHOENIX_B_60, SPELL_PHOENIX_B_100, SPELL_PHOENIX_B_150, SPELL_PHOENIX_B_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_catmount", 0, SPELL_CATMOUNT_60, SPELL_CATMOUNT_100, SPELL_CATMOUNT_150, SPELL_CATMOUNT_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_fox", 0, SPELL_FOX_60, SPELL_FOX_100, SPELL_FOX_150, SPELL_FOX_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_hand", 0, SPELL_HAND_60, SPELL_HAND_100, SPELL_HAND_150, SPELL_HAND_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_blazing_hippogryph", 0, 0, 0, SPELL_BLAZING_HIPPOGRYPH_150, SPELL_BLAZING_HIPPOGRYPH_280);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_celestial_steed", 0, SPELL_CELESTIAL_STEED_60, SPELL_CELESTIAL_STEED_100, SPELL_CELESTIAL_STEED_150, SPELL_CELESTIAL_STEED_280, SPELL_CELESTIAL_STEED_310);
RegisterSpellScriptWithArgs(spell_gen_mount, "spell_x53_touring_rocket", 0, 0, 0, SPELL_X53_TOURING_ROCKET_150, SPELL_X53_TOURING_ROCKET_280, SPELL_X53_TOURING_ROCKET_310);
Expand Down
2 changes: 1 addition & 1 deletion src/server/shared/DataStores/DBCStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ struct MapEntry

bool IsContinent() const
{
return ID == 0 || ID == 1 || ID == 530 || ID == 571;
return ID == 0 || ID == 1 || ID == 530 || ID == 571 || ID == 728 || ID == 732 || ID == 733;
}

bool IsDynamicDifficultyMap() const { return (Flags & MAP_FLAG_DYNAMIC_DIFFICULTY) != 0; }
Expand Down
4 changes: 4 additions & 0 deletions src/tools/map_extractor/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ const char *CONF_mpq_list[]={
"patch-3.MPQ",
"patch-4.MPQ",
"patch-5.MPQ",
"patch-6.MPQ",
"patch-7.MPQ",
"patch-8.MPQ",
"patch-9.MPQ",
};

static char const* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
Expand Down