From f811e298d58db627d814456b50269eef43b8f5f5 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 16 Nov 2012 00:49:02 +0000
Subject: [PATCH] stuff

git-svn-id: http://svn.net-core.org/repos/t-engine4@5796 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/engines/default/engine/PlayerProfile.lua       | 13 +++++++++++++
 game/modules/tome/data/general/events/font-life.lua |  1 -
 game/modules/tome/dialogs/UseItemDialog.lua         |  2 +-
 game/profile-thread/Client.lua                      |  8 +++++---
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/game/engines/default/engine/PlayerProfile.lua b/game/engines/default/engine/PlayerProfile.lua
index 6b215eaf08..1e19f6a2bd 100644
--- a/game/engines/default/engine/PlayerProfile.lua
+++ b/game/engines/default/engine/PlayerProfile.lua
@@ -736,6 +736,19 @@ function _M:newProfile(Login, Name, Password, Email)
 	self:performlogin(Login, Password)
 end
 
+function _M:entityVaultPoke(module, kind, name, desc, data)
+	if not data then return end
+	if not self.auth then return end
+	core.profile.pushOrder(table.serialize{o="EntityPoke",
+		module=module,
+		kind=kind,
+		name=name,
+		desc=desc,
+		data=data,
+	})
+	print("[ONLINE PROFILE] poke entity vault", module, kind, name)
+end
+
 function _M:isDonator(s)
 	s = s or 1
 	if not self.auth or not tonumber(self.auth.donated) or tonumber(self.auth.donated) <= s then return false else return true end
diff --git a/game/modules/tome/data/general/events/font-life.lua b/game/modules/tome/data/general/events/font-life.lua
index bb78ea8630..d7b79b423c 100644
--- a/game/modules/tome/data/general/events/font-life.lua
+++ b/game/modules/tome/data/general/events/font-life.lua
@@ -47,5 +47,4 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do
 	g.on_stand_safe = true
 	game.zone:addEntity(game.level, g, "terrain", x, y)
 end end
-game.log("==== FONT at %dx%d", x,y)
 return true
diff --git a/game/modules/tome/dialogs/UseItemDialog.lua b/game/modules/tome/dialogs/UseItemDialog.lua
index 6dce535dd2..840842d40a 100644
--- a/game/modules/tome/dialogs/UseItemDialog.lua
+++ b/game/modules/tome/dialogs/UseItemDialog.lua
@@ -86,7 +86,7 @@ function _M:use(item)
 	elseif act == "chat-link" then
 		profile.chat.uc_ext:sendObjectLink(self.object)
 	else
-		self:triggerHook{"UseItemMenu:use", actor=self.actor, object=self.object, inven=self.inven, item=self.item, act=act}
+		self:triggerHook{"UseItemMenu:use", actor=self.actor, object=self.object, inven=self.inven, item=self.item, act=act, onuse=self.onuse}
 	end
 end
 
diff --git a/game/profile-thread/Client.lua b/game/profile-thread/Client.lua
index 84bf52b22f..1c6532e5ff 100644
--- a/game/profile-thread/Client.lua
+++ b/game/profile-thread/Client.lua
@@ -23,7 +23,7 @@ local UserChat = require "profile-thread.UserChat"
 
 module(..., package.seeall, class.make)
 
-local debug = true
+local debug = false
 
 local mport = debug and 2259 or 2257
 local pport = debug and 2260 or 2258
@@ -477,8 +477,10 @@ function _M:orderEntityInfos(o)
 end
 
 function _M:orderEntityPoke(o)
-	self:command("EVLT", "POKE", o.data:len(), o.module, o.kind, o.name)
-	if not self:read("200") then return end
+	self:command("EVLT", "POKE", o.desc:len(), o.data:len(), o.module, o.kind, o.name)
+	if not self:read("200") then return cprofile.pushEvent("e='EntityPoke' ok=false") end
+	self.sock:send(o.desc)
+	if not self:read("200") then return cprofile.pushEvent("e='EntityPoke' ok=false") end
 	self.sock:send(o.data)
 	cprofile.pushEvent("e='EntityPoke' ok=true")
 end
-- 
GitLab