Skip to content

Instantly share code, notes, and snippets.

View gist:439050
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d44df94..8dbb3c7 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3578,6 +3578,9 @@ void Spell::SendChannelStart(uint32 duration)
}
}
+ //Apply haste rating
+ duration = ApplyHasteToChannelSpell(duration, m_spellInfo, this);
View gist:503920
/*########
## npc_arei
########*/
#define QUEST_ANCIENT_SPIRIT 4261
#define C_TOXIC_HORROR 7132
#define C_IRONTREE_STOMPER 7139
#define S_AREI_TRANSFORM 14888
View gist:503924
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
View gist:519116
[Parser(Opcode.SMSG_UPDATE_LFG_LIST)]
public static void HandleUpdateLfgList(Packet packet)
{
var type = (LfgType)packet.ReadInt32();
Console.WriteLine("LFG Type: " + type);
var id = packet.ReadInt32();
Console.WriteLine("Dungeon ID: " + id);
var unkBool = packet.ReadBoolean();
View gist:601823
src/game/Group.cpp | 33 ++++++++++++++++++++++++
src/game/Group.h | 3 ++
src/game/GroupHandler.cpp | 3 ++
src/game/Object.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++-
src/game/Object.h | 3 ++
src/game/TradeHandler.cpp | 6 +++-
src/game/Unit.cpp | 3 ++
src/game/Unit.h | 9 ++++++-
8 files changed, 118 insertions(+), 4 deletions(-)
View gist:608686
bool Unit::IsSpellCrit(...)
{
....
// Creatures cant crit with spells
if (GetTypeId() == TYPEID_UNIT && (((Creature*)this)->GetSubtype() == CREATURE_SUBTYPE_GENERIC // If its normal creature
|| (((Creature*)this)->GetSubtype() == CREATURE_SUBTYPE_TEMPORARY_SUMMON && !((Creature*)this)->GetOwnerGUID())) // or temporary summon without owner, hope this is correct
&& spellProto->DmgClass == SPELL_DAMAGE_CLASS_MAGIC) // Also affect only magic
return false;
....
}
@Tasssadar
Tasssadar / gist:642687
Created Oct 23, 2010
Highguid instance
View gist:642687
diff --git a/src/game/ObjectGuid.cpp b/src/game/ObjectGuid.cpp
index eefc901..c297263 100644
--- a/src/game/ObjectGuid.cpp
+++ b/src/game/ObjectGuid.cpp
@@ -37,6 +37,7 @@ char const* ObjectGuid::GetTypeName(HighGuid high)
case HIGHGUID_DYNAMICOBJECT:return "DynObject";
case HIGHGUID_CORPSE: return "Corpse";
case HIGHGUID_MO_TRANSPORT: return "MoTransport";
+ case HIGHGUID_INSTANCE: return "InstanceID";
default:
@Tasssadar
Tasssadar / kindle_xkcd_screensaver.sh
Created Dec 26, 2011
This script will periodicaly try to download newest xkcd comic strip and put it into /mnt/us/screensaver, so it will show as screensaver
View kindle_xkcd_screensaver.sh
#!/bin/sh
# This script will periodicaly try to download newest xkcd comic strip
# and put it into /mnt/us/screensaver, so it will show as screensaver
# It is for Kindle 4 and requires screensaver hack
lastVer=0
w=0
h=0
while :; do
echo "check"
rm /tmp/xkcd &> /dev/null
@Tasssadar
Tasssadar / kindle_eink.sh
Created Dec 27, 2011
This script will change between two eink modes - normal and fast-redraw with ungly font on predefined key sequence. Currently it is 2x back 2x home.
View kindle_eink.sh
#!/bin/sh
# This script will change between two eink modes - normal and fast-redraw with ungly font
# on predefined key sequence. Currently it is 2x back 2x home.
# It also can show battery level in % - that is 2x home, look at the bottom of the screen
# It is for Kindle 4
#
# Key codes
# 158 1 - back
# 29 1 - keyboard
# 102 1 - home
@Tasssadar
Tasssadar / snake.js
Created Mar 15, 2012
JavaScript implementation of Snake game for Lorris
View snake.js
var MOVE_UP = 0;
var MOVE_DOWN = 1;
var MOVE_LEFT = 2;
var MOVE_RIGHT = 3;
var STEP_LEN = script.height;
clearTerm();
var timer = newTimer();