mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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();
|
m_senderId = sender->GetEntry();
|
||||||
break;
|
break;
|
||||||
case TYPEID_ITEM:
|
case TYPEID_ITEM:
|
||||||
|
case TYPEID_CONTAINER:
|
||||||
m_messageType = MAIL_ITEM;
|
m_messageType = MAIL_ITEM;
|
||||||
m_senderId = sender->GetEntry();
|
m_senderId = sender->GetEntry();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1611,7 +1611,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O
|
||||||
// prepare static data
|
// prepare static data
|
||||||
ObjectGuid sourceGuid = source->GetObjectGuid();
|
ObjectGuid sourceGuid = source->GetObjectGuid();
|
||||||
ObjectGuid targetGuid = target ? target->GetObjectGuid() : ObjectGuid();
|
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
|
///- Schedule script execution for all scripts in the script map
|
||||||
ScriptMap const *s2 = &(s->second);
|
ScriptMap const *s2 = &(s->second);
|
||||||
|
|
@ -1642,7 +1642,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou
|
||||||
// prepare static data
|
// prepare static data
|
||||||
ObjectGuid sourceGuid = source->GetObjectGuid();
|
ObjectGuid sourceGuid = source->GetObjectGuid();
|
||||||
ObjectGuid targetGuid = target ? target->GetObjectGuid() : ObjectGuid();
|
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;
|
ScriptAction sa;
|
||||||
sa.sourceGuid = sourceGuid;
|
sa.sourceGuid = sourceGuid;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11436"
|
#define REVISION_NR "11437"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue