mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11437] Fixed cases where forgotten that bags have TYPEID_CONTAINER != TYPEID_ITEM
Script case low chance affect real cases but for mail send from item can fix some problems.
This commit is contained in:
parent
7237fe7f62
commit
1cd48649c2
3 changed files with 4 additions and 3 deletions
|
|
@ -1611,7 +1611,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O
|
|||
// prepare static data
|
||||
ObjectGuid sourceGuid = source->GetObjectGuid();
|
||||
ObjectGuid targetGuid = target ? target->GetObjectGuid() : ObjectGuid();
|
||||
ObjectGuid ownerGuid = (source->GetTypeId()==TYPEID_ITEM) ? ((Item*)source)->GetOwnerGuid() : ObjectGuid();
|
||||
ObjectGuid ownerGuid = source->isType(TYPEMASK_ITEM) ? ((Item*)source)->GetOwnerGuid() : ObjectGuid();
|
||||
|
||||
///- Schedule script execution for all scripts in the script map
|
||||
ScriptMap const *s2 = &(s->second);
|
||||
|
|
@ -1642,7 +1642,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou
|
|||
// prepare static data
|
||||
ObjectGuid sourceGuid = source->GetObjectGuid();
|
||||
ObjectGuid targetGuid = target ? target->GetObjectGuid() : ObjectGuid();
|
||||
ObjectGuid ownerGuid = (source->GetTypeId()==TYPEID_ITEM) ? ((Item*)source)->GetOwnerGuid() : ObjectGuid();
|
||||
ObjectGuid ownerGuid = source->isType(TYPEMASK_ITEM) ? ((Item*)source)->GetOwnerGuid() : ObjectGuid();
|
||||
|
||||
ScriptAction sa;
|
||||
sa.sourceGuid = sourceGuid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue