[10876] Really fix crash in SendTrainerList :/

This commit is contained in:
VladimirMangos 2010-12-14 18:52:36 +03:00
parent 0d443681f5
commit 6c14f9fad3
2 changed files with 3 additions and 2 deletions

View file

@ -165,10 +165,11 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
}
uint32 maxcount = (cSpells ? cSpells->spellList.size() : 0) + (tSpells ? tSpells->spellList.size() : 0);
uint32 trainer_type = cSpells && cSpells->trainerType ? cSpells->trainerType : (tSpells ? tSpells->trainerType : 0);
WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+maxcount*38 + strTitle.size()+1);
data << ObjectGuid(guid);
data << uint32(cSpells && cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType);
data << uint32(trainer_type);
size_t count_pos = data.wpos();
data << uint32(maxcount);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10875"
#define REVISION_NR "10876"
#endif // __REVISION_NR_H__