Skip to content

Instantly share code, notes, and snippets.

@Retriman
Retriman / Master Call Fix 1
Created November 1, 2011 15:01
Master Call Fix 1
@@ -301,11 +301,11 @@ class spell_hun_masters_call : public SpellScriptLoader
// it's more likely that on on retail it's possible to call target selector based on dbc values
// anyways, we're using GetTargetUnit() here and it's ok
if (Unit* ally = GetTargetUnit())
{
target->CastSpell(ally, GetEffectValue(), castMask);
- target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
+ target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), castMask);
}
}
@Retriman
Retriman / gist:1335208
Created November 2, 2011 22:53
Delay Spells
----------------------- src/server/game/Spells/Spell.cpp -----------------------
index 3acfa51..fe10d59 100644
@@ -1464,9 +1464,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
else if (m_caster->IsFriendlyTo(unit))
{
// for delayed spells ignore negative spells (after duel end) for friendly targets
- // TODO: this cause soul transfer bugged
- if (m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive())
- return SPELL_MISS_EVADE;
+ // TODO: this cause soul transfer bugged..We realy need it?¿ :s
@Retriman
Retriman / gist:1356450
Created November 10, 2011 22:23
mas de dos profesiones
@@ -21324,10 +21324,44 @@ void Player::UpdateVisibilityForPlayer()
}
void Player::InitPrimaryProfessions()
{
SetFreePrimaryProfessions(sWorld->getIntConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
+
+ // Chequea Numero De profesiones primarias.
+ if (GetSession()->GetSecurity() < SEC_GAMEMASTER) // solo gms podran tener mas de 1 profesion
+ {
@Retriman
Retriman / gist:2874937
Created June 5, 2012 13:20
Crash in dtNavMesh::getTileAndPolyByRef
[New Thread 0x7f3d9afff700 (LWP 16471)]
[New Thread 0x7f3d99fff700 (LWP 16472)]
[New Thread 0x7f3d8fbff700 (LWP 16473)]
[New Thread 0x7f3d8ebff700 (LWP 16474)]
[New Thread 0x7f3d8e3fe700 (LWP 16475)]
[New Thread 0x7f3d8d3ff700 (LWP 16476)]
[Thread 0x7f3d8e3fe700 (LWP 16475) exited]
[New Thread 0x7f3d8bfff700 (LWP 16477)]
[New Thread 0x7f3d8b7fe700 (LWP 16478)]
[New Thread 0x7fd38b3ff700 (LWP 3687)]
[New Thread 0x7fd38abfe700 (LWP 3688)]
[New Thread 0x7fd3807ff700 (LWP 3689)]
[New Thread 0x7fd37f7ff700 (LWP 3690)]
[New Thread 0x7fd37effe700 (LWP 3691)]
[New Thread 0x7fd37dbff700 (LWP 3692)]
[Thread 0x7fd37effe700 (LWP 3691) exited]
[New Thread 0x7fd37cbff700 (LWP 3693)]
[New Thread 0x7fd37c3fe700 (LWP 3694)]
@Retriman
Retriman / gist:3818309
Created October 2, 2012 11:26
Fix comment commit in r 139a9533256e0312e06fb72cb30622545629f161
@@ -55,30 +55,18 @@ class boss_amanitar : public CreatureScript
public:
boss_amanitar() : CreatureScript("boss_amanitar") { }
struct boss_amanitarAI : public BossAI
{
- boss_amanitarAI(Creature* creature) : BossAI(creature, DATA_AMANITAR)
- {
- instance = creature->GetInstanceScript();
- }
@Retriman
Retriman / gist:3823811
Created October 2, 2012 22:50
Boss Elder Nadox
@@ -23,65 +23,74 @@ enum Yells
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_DEATH = 2,
SAY_EGG_SAC = 3,
- EMOTE_HATCHES = 4
+ EMOTE_HATCHES = 4
};
@Retriman
Retriman / gist:3836496
Created October 4, 2012 21:13
Totems de chami(tremor, grounding) respetando colision y LoS q no deberia ser
@@ -3474,11 +3474,11 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
// all effect mustn't be applied
ASSERT(!aurApp->GetEffectMask());
// Remove totem at next update if totem loses its aura
- if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem()&& ToTotem()->GetSummonerGUID() == aura->GetCasterGUID())
+ if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem())
{
if (ToTotem()->GetSpell() == aura->GetId() && ToTotem()->GetTotemType() == TOTEM_PASSIVE)
@Retriman
Retriman / gist:3840203
Created October 5, 2012 14:43
Icecrown
@@ -491,14 +491,362 @@ class npc_tournament_training_dummy : public CreatureScript
return new npc_tournament_training_dummyAI(creature);
}
};
+
+/*######
+## npc_faction_valiant_champion
+######*/
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -493,6 +493,353 @@ class npc_tournament_training_dummy : public CreatureScript
};
+
+/*######
+## npc_faction_valiant_champion
+######*/