Skip to content

Instantly share code, notes, and snippets.

View Konctantin's full-sized avatar
🎯
Focusing

Konctantin Konctantin

🎯
Focusing
View GitHub Profile
private string GetAuras(WoWObject obj)
{
List<uint> content = new List<uint>();
if (Auras.ContainsKey(obj.WowGuid))
{
foreach (AuraUpdate spellInfo in Auras[obj.WowGuid].Updates)
{
if (spellInfo.SpellId > 0 && (spellInfo.Flags & AuraFlags.NotCaster) != 0)
{
/// <summary>
/// Structure that represents a rotation in three dimensions.
/// </summary>
public struct Quaternion
{
const int PACK_COEFF_YZ = 1 << 20;
const int PACK_COEFF_X = 1 << 21;
/// <summary>
/// The X component of the quaternion.
namespace Kamilla.WorldOfWarcraft.Latest.Parsers.Gossip
{
// TODO: redo
[WowPacketParser(WowOpcodes.SMSG_QUESTGIVER_OFFER_REWARD)]
internal sealed class QuestGiverOfferRewardParser : WowPacketParser
{
protected override void Parse()
{
OfferReward or = new OfferReward();
/*
* Example
using System;
using System.Drawing;
using System.Drawing.Imaging;
namespace BLP
{
class Program
{
#region Inject
/// <summary>
///
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public unsafe byte[] Assemble(string source)
{
var passesLimit = 0x100;
static void DumpPacket(DWORD packetType, DWORD connectionId, DWORD packetOpcode, DWORD packetSize, DWORD buffer, const WORD initialReadOffset)
{
// gets the time
time_t rawTime;
time(&rawTime);
DWORD optionalHeaderLength = 0;
if (!fileDump)
{
tm* date = localtime(&rawTime);
@Konctantin
Konctantin / ProcessMemory
Created March 28, 2014 16:21
ProcessMemory
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace NetCallerFunc
ABILITY_TABLE = { };
EVENT_MODS = { };
LOSS_TABLE = { };
NOTIFY_CAST_TABLE = { };
LAST_TARGET = 0;
-- Константы горячих клавиш
mkLeftShift = 1;
mkLeftControl = 2;
mkLeftAlt = 3;
@Konctantin
Konctantin / git-gui.tcl
Last active August 29, 2015 14:19
append more commands for git-gui
$ctxm add command -label [mc "Open in external editor"] \
-command {
#set prog "notepad"
set prog "C:\\Program Files (x86)\\Notepad++\\notepad++.exe"
exec $prog [file join $_gitworktree $current_diff_path]
}
$ctxm add command -label [mc "Reset file changes"] \
-command {
if { $current_diff_path ne "" && [tk_messageBox \
-icon question \
@Konctantin
Konctantin / quesr_reward.py
Created September 12, 2015 13:10
wowhead parser
import sys
from urllib.request import urlopen
from time import sleep
def clenuap(content):
return content.strip() \
.replace("<br />", "\\n") \
.replace("&lt;", "<") \
.replace("&gt;", ">") \
.replace("&nbsp;", " ") \