添加 生物召唤物体验证,设置了错误物体提示信息
This commit is contained in:
parent
b5c1e54660
commit
23ecb652d6
@ -250,16 +250,25 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void ProcessKillRewards(Player* killer, Creature* killed,
|
||||
mod_CustomCreature* customCreature,
|
||||
CreautreModTemplate* modTemplate)
|
||||
void ProcessKillRewards(Player* killer, Creature* killed, mod_CustomCreature* customCreature, CreautreModTemplate* modTemplate)
|
||||
{
|
||||
// 游戏对象召唤
|
||||
if (customCreature->C_KillRewGameObject != 0)
|
||||
killer->SummonGameObject(customCreature->C_KillRewGameObject,
|
||||
killed->GetPositionX(), killed->GetPositionY(),
|
||||
killed->GetPositionZ(), killed->GetOrientation(),
|
||||
0, 0, 0, 0, 0);
|
||||
{
|
||||
// 验证模板是否存在
|
||||
if (GameObjectTemplate const* goTemplate = sObjectMgr->GetGameObjectTemplate(customCreature->C_KillRewGameObject))
|
||||
{
|
||||
killer->SummonGameObject(customCreature->C_KillRewGameObject,
|
||||
killed->GetPositionX(), killed->GetPositionY(),
|
||||
killed->GetPositionZ(), killed->GetOrientation(),
|
||||
0, 0, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("sql.sql", "GameObject template {} not found for creature kill reward",
|
||||
customCreature->C_KillRewGameObject);
|
||||
}
|
||||
}
|
||||
|
||||
// 个人击杀奖励
|
||||
if (customCreature->C_KillRewId != 0 &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user