首先,铁砧属于 game object , 是通过gm命令的 gobject 管理的,数据表在world库中
gameobject_template 模板表
gameobject 实例表
直接上游戏并连接数据库确认下:
在 gameobject_template 和 gameobject 表中查看下:
1 2 3 4 5 6 7 8 9 10 11
>SELECT*FROM gameobject_template where entry =173065; entry |type|displayId|name|IconName|castBarCaption|unk1|faction|flags|size|Data0|Data1|Data2|Data3|Data4|Data5|Data6|Data7|Data8|Data9|Data10|Data11|Data12|Data13|Data14|Data15|Data16|Data17|Data18|Data19|Data20|Data21|Data22|Data23|AIName|ScriptName|VerifiedBuild|isnew| ------+----+---------+----+--------+--------------+----+-------+-----+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+----------+-------------+-----+ 173065|8|273|铁砧 ||||0|0|1.85|1|10|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|||12340|0|
>select*from gameobject g where id =173065; guid |id |map|zoneId|areaId|spawnMask|phaseMask|position_x|position_y|position_z|orientation|rotation0|rotation1|rotation2|rotation3|spawntimesecs|animprogress|state|VerifiedBuild|isnew| -----+------+---+------+------+---------+---------+----------+----------+----------+-----------+---------+---------+---------+---------+-------------+------------+-----+-------------+-----+ 27854|173065|530|0|0|1|1|-3099.95|2593.29|62.7088|0.914039|0.0|0.0|0.441275|0.897372|25|0|1|0|0| 10187|173065|1|0|0|1|1|2057.71|-4798.63|22.5034|0.802851|0.0|0.0|0.390731|0.920505|900|100|1|0|0|
TestIt=function(player)--test it if(player:IsInCombat())then player:SendAreaTriggerMessage("不能在战斗中召唤。") else local x,y,z=player:GetX()+0.1,player:GetY(),player:GetZ() local NPC=player:SummonGameObject(173065,x,y,z,20*1000) -- 20s if(NPC)then player:SendAreaTriggerMessage("召唤成功") else player:SendAreaTriggerMessage("召唤失败") end end end