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

Update test #7

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0ecfb0a
Einfügen meiner Mount Spells
Krutok Sep 1, 2023
0eb6d23
Mount und Spell - Spellfixes
Krutok Sep 1, 2023
6c2bb09
Mehr MPQ Dateien
Krutok Sep 1, 2023
70b032c
Fehlende Spells für Mounts hinzugefügt
Krutok Sep 1, 2023
857375f
Update DBCStructure.h: Custom maps als Continent
Krutok Sep 1, 2023
c3d6e61
Merge pull request #1 from Krutok/My_Custom_Changes
Krutok Sep 1, 2023
7fb4cdb
Merge pull request #2 from TrinityCore/3.3.5
Krutok Sep 2, 2023
400b1df
Merge branch 'trickerer:npcbots_3.3.5' into My_Custom_Changes
Krutok Sep 17, 2023
37479c2
Merge pull request #8 from TrinityCore/3.3.5
Krutok Sep 17, 2023
cf003a2
Merge pull request #9 from Krutok/TC-Update
Krutok Sep 17, 2023
fa9105a
Merge pull request #15 from TrinityCore/3.3.5
Krutok Sep 17, 2023
d6aacd9
Merge pull request #16 from Krutok/npcbots_3.3.5
Krutok Sep 17, 2023
1d9172d
Merge pull request #18 from TrinityCore/3.3.5
Krutok Sep 18, 2023
486a794
Update Spell.cpp
Krutok Sep 18, 2023
e5e6909
Update SpellAuraEffects.cpp
Krutok Sep 18, 2023
136e88a
Update Player.cpp
Krutok Sep 18, 2023
3aba9d9
Merge branch 'trickerer:npcbots_3.3.5' into My_Custom_Changes
Krutok Sep 24, 2023
ca79d0b
Merge pull request #22 from TrinityCore/3.3.5
Krutok Sep 24, 2023
e8eff9b
Merge branch 'trickerer:npcbots_3.3.5' into My_Custom_Changes
Krutok Oct 1, 2023
1078f51
Merge branch 'trickerer:npcbots_3.3.5' into My_Custom_Changes
Krutok Oct 17, 2023
8813268
Merge pull request #25 from TrinityCore/3.3.5
Krutok Oct 17, 2023
b51e2cc
Update Unit.cpp: Artefaktskin spells
Krutok Oct 17, 2023
71e1104
Merge branch 'trickerer:npcbots_3.3.5' into My_Custom_Changes
Krutok Oct 22, 2023
dc8d67e
Merge pull request #29 from TrinityCore/3.3.5
Krutok Oct 28, 2023
1599158
Merge pull request #31 from TrinityCore/3.3.5
Krutok Nov 5, 2023
65ec0a1
Update Player.h
Krutok Nov 5, 2023
4c01ba6
Update Player.cpp
Krutok Nov 5, 2023
0178eb1
Update SpellAuraEffects.cpp
Krutok Nov 5, 2023
4cf77db
Update SpellAuraEffects.cpp
Krutok Nov 5, 2023
c7389c1
Update SpellAuraEffects.cpp
Krutok Nov 8, 2023
bba764a
Update SpellMgr.cpp
Krutok Nov 8, 2023
8426691
Update spell_generic.cpp
Krutok Nov 8, 2023
a9b38fb
Update spell_generic.cpp
Krutok Nov 8, 2023
818098b
Merge pull request #34 from TrinityCore/3.3.5
Krutok Nov 8, 2023
4e18b87
Revert "Core/Spells: Make SpellEffectInfo not copyable"
Krutok Nov 9, 2023
e8750bc
Merge pull request #46 from trickerer/npcbots_3.3.5
Krutok Feb 9, 2024
521905f
Merge pull request #47 from Krutok/revert-29-3.3.5
Krutok Feb 9, 2024
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
61 changes: 61 additions & 0 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12051,6 +12051,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 Expand Up @@ -27171,3 +27175,60 @@ GameClient* Player::GetGameClient() const
{
return GetSession()->GetGameClient();
}

// Wahl des Klassenmounts noch inaktiv -> Zum aktivieren /**/ entfernen
/*
uint8 Player::GetMostPointsTalentTree() const
{
uint32 active_spec = GetActiveSpec();

std::unordered_map<uint32, uint32> spec_data;

for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
{
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);

if (!talentInfo)
continue;

TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID);

if (!talentTabInfo)
continue;

if ((GetClassMask() & talentTabInfo->ClassMask) == 0)
continue;

uint8 currentTalentRank = 0;
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
// skip non-existing talent ranks
if (talentInfo->SpellRank[rank] == 0)
continue;

SpellInfo const* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->SpellRank[rank]);
if (!_spellEntry)
continue;

// if he doesn't have the talent skip
if (!HasTalent(talentInfo->SpellRank[rank], active_spec))
continue;

currentTalentRank = rank + 1;
spec_data[talentTabInfo->ID] += currentTalentRank;
}
}

std::pair<uint32, uint32> max_spec = { 0, 0 };
for (const auto& [spec_id, talent_count] : spec_data)
{
if (talent_count > max_spec.second)
{
max_spec.first = spec_id;
max_spec.second = talent_count;
}
}

return max_spec.first;
}
*/
3 changes: 3 additions & 0 deletions src/server/game/Entities/Player/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,9 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>

std::string GetDebugInfo() const override;

// Wahl des Klassenmounts noch inaktiv -> Zu Aktivieren // entfernen
// uint8 GetMostPointsTalentTree() const;

/*****************************************************************/
/*** NPCBOT SYSTEM ***/
/*****************************************************************/
Expand Down
46 changes: 46 additions & 0 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12944,6 +12944,52 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const
break;
}

if (Player const* player = ToPlayer())
{
switch (form)
{
case FORM_DIREBEAR:
case FORM_BEAR:
{
if (player->HasAura(81139))
return 32984; // Display ID
else if (player->HasAura(81141))
return 32985; // Display ID
else if (player->HasAura(81143))
return 32986; // Display ID
else if (player->HasAura(81145))
return 32987; // Display ID
else if (player->HasAura(81147))
return 32988; // Display ID
else if (player->HasAura(81149))
return 32989; // Display ID
else if (player->HasAura(81151))
return 32990; // Display ID
else if (player->HasAura(81153))
return 32991; // Display ID
else if (player->HasAura(81155))
return 32992; // Display ID
else if (player->HasAura(81157))
return 32993; // Display ID
else if (player->HasAura(81159))
return 32994; // Display ID
else if (player->HasAura(81161))
return 32995; // Display ID
else if (player->HasAura(81163))
return 32996; // Display ID
else if (player->HasAura(81165))
return 32997; // Display ID
else if (player->HasAura(81167))
return 32998; // Display ID
else if (player->HasAura(81169))
return 32999; // Display ID
break;
}
default:
break;
}
}

if (Player const* player = ToPlayer())
{
switch (form)
Expand Down
91 changes: 91 additions & 0 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2607,6 +2607,90 @@ void AuraEffect::HandleAuraModSkill(AuraApplication const* aurApp, uint8 mode, b
/****************************/
/*** MOVEMENT ***/
/****************************/
/* Wahl des Klassenmounts -> zum aktivieren ** entfernen
enum ClassSpec
{
MAGE_ARCANE = 81,
MAGE_FIRE = 41,
MAGE_FROST = 61,

WARRIOR_ARMS = 161,
WARRIOR_FURY = 164,
WARRIOR_PROTECTION = 163,

ROGUE_ASSASSINATION = 182,
ROGUE_COMBAT = 181,
ROGUE_SUBTLETY = 183,

PRIEST_DISCIPLINE = 201,
PRIEST_HOLY = 202,
PRIEST_SHADOW = 203,

SHAMAN_ELEMENTAL = 5,
SHAMAN_ENHANCEMENT = 7,
SHAMAN_RESTORATION = 6,

DRUID_BALANCE = 27,
DRUID_FERAL = 25,
DRUID_RESTORATION = 26,

WARLOCK_AFFLICTION = 46,
WARLOCK_DEMONOLOGY = 47,
WARLOCK_DESTRUCTION = 45,

HUNTER_BEAST_MASTERY = 105,
HUNTER_MARKSMANSHIP = 107,
HUNTER_SURVIVAL = 106,

PALADIN_HOLY = 126,
PALADIN_PROTECTION = 127,
PALADIN_RETRIBUTION = 125,

DEATH_KNIGHT_BLOOD = 142,
DEATH_KNIGHT_FROST = 143,
DEATH_KNIGHT_UNHOLY = 144
};

void UpdateCustomMountDisplayId(Unit* target, uint32& creatureEntry)
{
if (!target->ToPlayer())
return;

const uint32 active_spec = target->ToPlayer()->GetMostPointsTalentTree();

if (target->HasAura(75620))
{

switch (active_spec)
{
case MAGE_ARCANE:
creatureEntry = 32637;
break;
case MAGE_FROST:
creatureEntry = 28531;
break;
case MAGE_FIRE:
creatureEntry = 40165;
break;
}
}
else if (target->HasAura(81240) || target->HasAura(81241) || target->HasAura(81242) || target->HasAura(81201))
{
switch (active_spec)
{
case WARLOCK_AFFLICTION:
creatureEntry = 100575;
break;
case WARLOCK_DESTRUCTION:
creatureEntry = 100579;
break;
case WARLOCK_DEMONOLOGY:
creatureEntry = 100580;
break;
}
}
}
*/

void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
Expand All @@ -2630,6 +2714,9 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo
creatureEntry = 15665;
}

// Wahl des Klassenmounts -> zum aktivieren // Entfernen
// UpdateCustomMountDisplayId(target, creatureEntry);

if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creatureEntry))
{
if (GetMiscValueB() > 0) // Choose proper modelid
Expand Down Expand Up @@ -4494,6 +4581,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
25 changes: 25 additions & 0 deletions src/server/game/Spells/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3474,6 +3474,25 @@ 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
81183, // Palamount Blau
81184, // Palamount Purple
81185, // Palamount Rot
81186, // Palamount Gelb
81187, // Jägermount Blau
81188, // Jägermount Grün
81189, // Jägermount Orange
81190, // Priestermount Diszi
81191, // Priestermount Holy
81192, // Priestermount Shatten
81201, // Hexenmeistermount Grün
81202, // Hexenmeistermount Rot
81203, // Hexenmeistermount Shatten
74856, // Blazing Hippogryph
75614, // Celestial Steed
75973 // X-53 Touring Rocket
Expand Down Expand Up @@ -4957,6 +4976,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
Loading
Loading