From fc8e16e33bc34bda74559d021f5c1855a789a2b2 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Mon, 16 Jul 2012 19:54:43 +0200 Subject: Added lua bind to send text effect particle to clients Change is tested. Reviewed-by: bjorn. --- src/scripting/lua.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/scripting/lua.cpp') diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index a6b26e92..05845a36 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1703,6 +1703,18 @@ static int chr_shake_screen(lua_State *s) return 0; } +static int chr_create_text_particle(lua_State *s) +{ + Character *c = checkCharacter(s, 1); + const char *text = luaL_checkstring(s, 2); + + MessageOut msg(GPMSG_CREATE_TEXT_PARTICLE); + msg.writeString(text); + c->getClient()->send(msg); + + return 0; +} + /** * chr_get_exp(Character*, int skill): int @@ -2478,6 +2490,7 @@ LuaScript::LuaScript(): { "being_register", &being_register }, { "effect_create", &effect_create }, { "chr_shake_screen", &chr_shake_screen }, + { "chr_create_text_particle", &chr_create_text_particle }, { "test_tableget", &test_tableget }, { "get_map_id", &get_map_id }, { "get_map_property", &get_map_property }, -- cgit v1.2.3-70-g09d2