mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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
|
|
@ -816,6 +816,7 @@ MailSender::MailSender( Object* sender, MailStationery stationery ) : m_statione
|
|||
m_senderId = sender->GetEntry();
|
||||
break;
|
||||
case TYPEID_ITEM:
|
||||
case TYPEID_CONTAINER:
|
||||
m_messageType = MAIL_ITEM;
|
||||
m_senderId = sender->GetEntry();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11436"
|
||||
#define REVISION_NR "11437"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue