Skip to content

Instantly share code, notes, and snippets.

View Konctantin's full-sized avatar
🎯
Focusing

Konctantin Konctantin

🎯
Focusing
View GitHub Profile
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;", " ") \
@Konctantin
Konctantin / page_text_loc8.py
Created September 15, 2015 07:47
locales_page_text parser
import sys
from urllib.request import urlopen
from time import sleep
"""
select concat('(',it.entry,', ', pt.entry, ', \'http://ru.wowhead.com/object=', it.entry,'\'),\\') as arr
from gameobject_template it
LEFT JOIN page_text pt ON it.data0 = pt.entry
left join locales_page_text lt ON pt.entry = lt.entry
where type=9 and ifnull(data0,0) <> 0 and lt.entry is null and pt.entry is not null
@Konctantin
Konctantin / gist:763862
Created January 3, 2011 19:58
Implement Xml Desirealiser for Swith segment
From cf8f47d667e569c7a3ec5c5c9855ca595d3696ad Mon Sep 17 00:00:00 2001
From: Konctantin <gawrilyako@gmail.com>
Date: Mon, 3 Jan 2011 21:56:08 +0200
Subject: [PATCH] Implement Xml Desirealiser for Swith segment
* small restucturisation of XmlParser
this is Alpfa version, need test
Signed-off-by: Konctantin <gawrilyako@gmail.com>
---
@Konctantin
Konctantin / gist:764106
Created January 3, 2011 22:39
load plugins
diff --git a/PacketViewer/FrmMain.cs b/PacketViewer/FrmMain.cs
index 1ce86d5..8e622be 100644
--- a/PacketViewer/FrmMain.cs
+++ b/PacketViewer/FrmMain.cs
@@ -9,23 +9,61 @@ using System.Windows.Forms;
using Kamilla;
using Kamilla.WorldOfWarcraft;
using PacketViewer.Properties;
+using PluginInterface;
+using System.ComponentModel.Composition;
Creature c = new Creature();
CreatureAddon ca = new CreatureAddon();
CreatureTemplate ct = new CreatureTemplate();
CreatureModelInfo cmi = new CreatureModelInfo();
var splin = mInfo.Spline.Splines;
c.map = obj.Map;
c.phaseMask = obj.Phase;
c.coord = mInfo.Position;
c.o = mInfo.Facing;
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
m_parser = new UpdateParser();
var parsers = (e.Argument as List<PacketParser>);
for (int i = 0; i < parsers.Count; ++i)
{
var code = parsers[i].Packet.Opcode;
var Reader = new BinaryReader(new MemoryStream(parsers[i].Packet.Data));
private string GetAuras(WoWObject obj)
{
StringBuilder content = new StringBuilder();
if (Auras.ContainsKey(obj.WowGuid))
{
foreach (AuraUpdate spellInfo in Auras[obj.WowGuid].Updates)
{
if (spellInfo.SpellId > 0 && (spellInfo.Flags & AuraFlags.NotCaster) != 0)
{
using System.Text;
using System.Collections.Generic;
using Kamilla;
using Kamilla.WorldOfWarcraft;
using Kamilla.WorldOfWarcraft.OpcodeDatas;
namespace PacketViewer.UpdatePacketParser
{
internal partial class UpdateParser
{