megamage
ebfb4c0558
[7971] Implement support exotic pets limtations related to hunter telent 53270. Author: VladimirMangos
...
Note: before this commit hunters can tame exotic pets like any other.
After patch like not propertly contriolled pets will auto-dismiss at loading
if talent not learned.
--HG--
branch : trunk
2009-06-06 20:31:23 -05:00
QAston
6f9f1a13f5
*Fix build.
...
--HG--
branch : trunk
2009-06-06 08:42:43 +02:00
QAston
39548d6822
*Update spellmod system
...
*Implement SPELL_ATTR_EX6_IGNORE_CASTER_AURAS
*Fix some bugs with traps proc flags
--HG--
branch : trunk
2009-06-06 08:27:36 +02:00
megamage
711ae28947
[7942] Fixed typo: proffesion->profession
...
[7944] Replace 10 by MAX_UNIT_ACTION_BAR_INDEX in packet size of SMSG_PET_SPELLS.
Author: yad02
--HG--
branch : trunk
2009-06-02 17:50:12 -05:00
megamage
30544055de
*Merge.
...
--HG--
branch : trunk
2009-06-01 15:26:44 -05:00
megamage
f92e8315cf
[7918] Improve portability in work with uint64 string format specifiers and in code literals. Author: VladimirMangos
...
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
Please always use UI64LIT(0x00001) instead less portable 0x00001LL
--HG--
branch : trunk
2009-05-31 16:15:12 -05:00
megamage
5ed5513ca8
Mangos [7911]. Author: tomrus88
...
Very big patch. May cause bugs.
--HG--
branch : trunk
2009-05-31 15:56:51 -05:00
megamage
bc32144310
*Update OutdoorPvP functions. No longer need creature triggers for capture points.
...
--HG--
branch : trunk
2009-05-29 00:18:41 -05:00
megamage
1288761fb7
[7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state. Author: VladimirMangos
...
Also related cleanup code in field cases and player Player::SetSheath.
--HG--
branch : trunk
2009-05-28 18:43:57 -05:00
thenecromancer
bc55209b3e
Restore used spell mods if spell cast fails.
...
--HG--
branch : trunk
2009-05-28 23:05:52 +02:00
megamage
73d31e2552
[7898] Improve client error output at different mail send errors, cleanup code. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-27 16:38:50 -05:00
megamage
cb72853dc6
*Cleanup message deliver functions. Remove unused parameters.
...
--HG--
branch : trunk
2009-05-27 09:09:22 -05:00
QAston
1c505261bc
*Remove auras with duration lower than 30 sec on arena start.
...
*Do not remove rougue poisons and dk runes on arena start.
*Apply healing bonus for healing stream totem.
*Do not duplicate damage bonus in code with the one in db for Seal of Vengenance/Corruption
--HG--
branch : trunk
2009-05-24 22:54:13 +02:00
megamage
2fadf3dd77
Fixed bank bag slot amount achievement statistic. Cleanup related code. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-24 11:17:03 -05:00
megamage
3641be039b
*Set pvp flags for units controlled by player.
...
*Reset pvp flags when unit is uncharmed.
*Remove walk flag when unit is charmed.
--HG--
branch : trunk
2009-05-22 03:12:35 -05:00
QAston
1403419164
*Fix reckonging
...
*fix Sword and Board
*Fix Vigilance
*Rollback sw:death fix.
--HG--
branch : trunk
2009-05-21 20:02:22 +02:00
megamage
a442a9b914
[7831] Prevent have hunter pet with level greater player levels at level changes. Propertly set hunter pet xp values at level update. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-15 13:44:49 -05:00
QAston
47d5fc51c5
*Item enchancment/proc patch - original code by Thenecromancer
...
-void Player::CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attType)
-{
- if(!item || item->IsBroken())
- return;
-
- ItemPrototype const *proto = item->GetProto();
- if(!proto)
- return;
+void Player::CastItemCombatSpell(Item *item, CalcDamageInfo *damageInfo, ItemPrototype const * proto)
+{
+ Unit * Target = damageInfo->target;
+ WeaponAttackType attType = damageInfo->attackType;
if (!Target || Target == this )
return;
- for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
- {
- _Spell const& spellData = proto->Spells[i];
-
- // no spell
- if(!spellData.SpellId )
- continue;
-
- // wrong triggering type
- if(spellData.SpellTrigger != ITEM_SPELLTRIGGER_CHANCE_ON_HIT)
- continue;
-
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
- if(!spellInfo)
- {
- sLog.outError("WORLD: unknown Item spellid %i", spellData.SpellId);
- continue;
- }
-
- // not allow proc extra attack spell at extra attack
- if( m_extraAttacks && IsSpellHaveEffect(spellInfo,SPELL_EFFECT_ADD_EXTRA_ATTACKS) )
- return;
-
- float chance = spellInfo->procChance;
-
- if(spellData.SpellPPMRate)
- {
- uint32 WeaponSpeed = GetAttackTime(attType);
- chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
- }
- else if(chance > 100.0f)
- {
- chance = GetWeaponProcChance();
- }
-
- if (roll_chance_f(chance))
- CastSpell(Target, spellInfo->Id, true, item);
+ // Can do effect if any damage done to target
+ if (damageInfo->damage)
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ _Spell const& spellData = proto->Spells[i];
+
+ // no spell
+ if(!spellData.SpellId )
+ continue;
+
+ // wrong triggering type
+ if(spellData.SpellTrigger != ITEM_SPELLTRIGGER_CHANCE_ON_HIT)
+ continue;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
+ if(!spellInfo)
+ {
+ sLog.outError("WORLD: unknown Item spellid %i", spellData.SpellId);
+ continue;
+ }
+
+ // not allow proc extra attack spell at extra attack
+ if( m_extraAttacks && IsSpellHaveEffect(spellInfo,SPELL_EFFECT_ADD_EXTRA_ATTACKS) )
+ return;
+
+ float chance = spellInfo->procChance;
+
+ if(spellData.SpellPPMRate)
+ {
+ uint32 WeaponSpeed = GetAttackTime(attType);
+ chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
+ }
+ else if(chance > 100.0f)
+ {
+ chance = GetWeaponProcChance();
+ }
+
+ if (roll_chance_f(chance))
+ CastSpell(Target, spellInfo->Id, true, item);
+ }
}
// item combat enchantments
@@ -6993,6 +6993,21 @@
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
+ SpellEnchantProcEntry const* entry = spellmgr.GetSpellEnchantProcEvent(enchant_id);
+
+ if (entry && entry->procEx)
+ {
+ // Check hit/crit/dodge/parry requirement
+ if((entry->procEx & damageInfo->procEx) == 0)
+ continue;
+ }
+ else
+ {
+ // Can do effect if any damage done to target
+ if (!(damageInfo->damage))
+ continue;
+ }
+
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pEnchant->spellid[s]);
if (!spellInfo)
{
@@ -7001,6 +7016,18 @@
}
float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance();
+
+ if (entry && entry->PPMChance)
+ {
+ uint32 WeaponSpeed = GetAttackTime(attType);
+ chance = GetPPMProcChance(WeaponSpeed, entry->PPMChance, spellInfo);
+ }
+ else if (entry && entry->customChance)
+ chance = entry->customChance;
+
+ // Apply spell mods
+ ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
+
if (roll_chance_f(chance))
{
if(IsPositiveSpell(pEnchant->spellid[s]))
@@ -7012,6 +7039,7 @@
}
}
+
void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 cast_count, uint32 glyphIndex)
{
ItemPrototype const* proto = item->GetProto();
--HG--
branch : trunk
2009-05-15 16:37:22 +02:00
Anubisss
e6cd40a619
*Implement GetSpellCooldowns() for get m_spellCooldowns(Player's map of spell CDs).
...
--HG--
branch : trunk
2009-05-15 17:54:10 +02:00
megamage
bf82601817
[7818] Implement SPELL_AURA_MOD_FACTION_REPUTATION_GAIN. Author: DonTomika
...
--HG--
branch : trunk
2009-05-14 11:56:02 -05:00
QAston
51b5f2aa64
*Allow Hots to proc-this should fix talents like 33776 effect from hots.
...
--HG--
branch : trunk
2009-05-11 23:46:45 +02:00
megamage
ff3332f066
[7809] Replace repeating "remove cooldown and send update to client" code by function call. Author: VladimirMangos
...
--HG--
branch : trunk
2009-05-10 14:51:51 -05:00
QAston
fcf0fdc1c1
*Item enchancment/proc patch - original code by Thenecromancer
...
--HG--
branch : trunk
2009-05-10 18:06:22 +02:00
megamage
29921b5bea
[7798] More Player::ActivateTaxiPathTo use improvements Author: VladimirMangos
...
* Provide more explicit way about spell that cast taxi flight if any
* Remove incorrect states instead error reporting in case non-taximaster flight start (cast/script)
* Remove mount_id arg from ActivateTaxiPathTo and implement support for 0 mount_id case (spell 32474)
* Implement spell 32474 (except finilize part)
* Provided Player::ActivateTaxiPathTo(uint32 taxi_path_id) function version for simplify one node to node paths use by id.
--HG--
branch : trunk
2009-05-08 18:52:12 -05:00
megamage
e69d2cbed9
[7776] Completed implementation of CMSG_SPELLCLICK Author: arrai
...
For vehicles, you have to add the correct SPELL_AURA_CONTROL_VEHICLE spells to
npc_spellclick_spells, otherwise you won't be able to use them
--HG--
branch : trunk
2009-05-05 16:56:15 -05:00
megamage
a04c9bfe00
[7772] Implement ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED Author: DonTomika
...
--HG--
branch : trunk
2009-05-05 14:48:48 -05:00
megamage
30ac988ad3
*Fix build.
...
--HG--
branch : trunk
2009-05-03 22:33:41 -05:00
megamage
85fbe3ada2
[7740] More correct flags in trainer list data for profession ranks. Author: VladimirMangos
...
Note: this is not fix problem with gren show recently learned non-first rank of primary profession.
Thanks to Seizerkiller for help in reseach.
--HG--
branch : trunk
2009-05-01 01:33:08 -05:00
megamage
4b4f472357
[7737] Implement ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE. Author: Trazom
...
Zone dependent achievement criteria required DB support.
--HG--
branch : trunk
2009-04-29 18:42:53 -05:00
megamage
de11b9e901
[7730] Some optimizantion and code style. Author: zhenya
...
--HG--
branch : trunk
2009-04-29 00:26:07 -05:00
megamage
bd4c2bdb64
[7728] Use correct loot_type values in data sent to client instead long time existed hacks. Code cleanups. Author: VladimirMangos
...
Thanks to Seizerkiller and TOM_RUS for help in reseach.
--HG--
branch : trunk
2009-04-27 21:29:01 -05:00
QAston
2d1521dea9
*Fix CAST_INTURRUPT_PREVIOUS flag for eventai action cast
...
*Rewrite .reload all pet_spells command to make it reset actionbars correctly.
--HG--
branch : trunk
2009-04-26 02:48:20 +02:00
QAston
066af701d3
*Fix frenzy and Ferocious Inspiration proc.
...
*Add command .reset all pet_spells - use it if you still have problems with pet talents after recent revs changes (like pets with all talents for example)
--HG--
branch : trunk
2009-04-23 20:57:17 +02:00
megamage
3a316370b1
[7696] Fixed compile warnings Author: AlexDereka
...
--HG--
branch : trunk
2009-04-22 17:56:59 -05:00
megamage
06667c40dd
*Fix some bugs about vehicle.
...
--HG--
branch : trunk
2009-04-21 15:43:03 -05:00
megamage
f9befe1d3d
[7688] Move Get*IfCanInteractWith to Player including renamed IsGameObjectOfTypeInRange. Author: VladimirMangos
...
--HG--
branch : trunk
2009-04-19 18:23:10 -05:00
Machiavelli
99fc17d44f
* Tabs to spaces cleanup
...
--HG--
branch : trunk
2009-04-19 18:48:20 +02:00
megamage
c7d78b5ff9
*Some work on vehicles.
...
--HG--
branch : trunk
2009-04-17 15:08:58 -05:00
megamage
0010f7ffe3
[7648] Resolve problems with expected fall damage at near teleport. Author: VladimirMangos
...
Move near teleport landing code to WorldSession::HandleMoveTeleportAck.
This make Player::TeleportTo code working in same way for both far/near teleports.
Move mSemaphoreTeleport from WorldObject to Player and merge with DoNotMove (using 2 fields for far/near teleport flag).
Skip movement packets until landing confirmation for near teleport from client.
--HG--
branch : trunk
2009-04-11 23:07:07 -05:00
megamage
3120221deb
*Note: this patch may do not have any use for TC.
...
[7645] Fixed problems wit temporary unsummoned pets and cleanup code. Author: VladimirMangos
* Save temporary unsummoned pet to current slot (instead non_in_slot mode) and
prevent save as current pet summoned while temporay unsummon (arena)
* Prevent overwrite temporary summoned pet data
* At player loading set temporary unsummoned pet data instead pet loading
if pet expected to be temporary unsummoned in current player state (loading in taxi flight/etc)
* Restore proper pet at arena leave and unsummon in arena summoned.
--HG--
branch : trunk
2009-04-11 14:47:38 -05:00
XTZGZoReX
2fe9fed7c7
* Tabs to spaces -- using: perl -p -i -e "s/\t/ /g" *
...
--HG--
branch : trunk
2009-04-07 10:51:45 +02:00
megamage
5acc0c057b
[7612] Move SMSG_TRIGGER_CINEMATIC and SMSG_TRIGGER_MOVIE to functions and use its instead explicit packet creating. Author: NoFantasy
...
--HG--
branch : trunk
2009-04-05 16:25:00 -05:00
QAston
20c02ef760
*Update of aura system.
...
--HG--
branch : trunk
2009-04-06 13:31:14 +02:00
megamage
1299521d50
[7559] Implement function Player::RewardPlayerAndGroupAtEvent for reward (quest objective only) player and group at special kill-like events. Author: Ramses_II
...
Use it for Spell::EffectKillCredit and some dummy code.
--HG--
branch : trunk
2009-03-28 16:26:31 -06:00
megamage
ff83e4a9b1
*Fix some bugs of pet.
...
--HG--
branch : trunk
2009-03-27 22:47:28 -06:00
megamage
68c3039715
*Move most reputation/force faction reaction code to new ReputationMgr. Author: VladimirMangos
...
--HG--
branch : trunk
2009-03-26 13:53:32 -06:00
megamage
02440eaa10
[7538] Hide some implementation details for reputation/forced faction reaction. Author: VladimirMangos
...
--HG--
branch : trunk
2009-03-25 16:04:08 -06:00
megamage
1c6c199f5d
[7533] Redirect movement packet in proper way to controlled target. Author: VladimirMangos
...
* In creature case ignore fall/etc damage
* In player case apply fall damage/etc to controlled player, apply other movement effect to it also.
--HG--
branch : trunk
2009-03-24 17:42:22 -06:00
megamage
c5969d6d03
*Make sure the a player can only have one viewpoint.
...
--HG--
branch : trunk
2009-03-24 13:13:00 -06:00
megamage
208398017a
[7529] Hide some implementation details for fall damage calculation and breath timers. Author: VladimirMangos
...
--HG--
branch : trunk
2009-03-24 09:46:45 -06:00