[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:
VladimirMangos 2011-05-08 03:45:20 +04:00
parent 7237fe7f62
commit 1cd48649c2
3 changed files with 4 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11436"
#define REVISION_NR "11437"
#endif // __REVISION_NR_H__