* one more little speedup in objmgr
This commit is contained in:
parent
529bf4742d
commit
b73017bccb
@ -94,8 +94,9 @@ void ObjMgr::Add(ItemProto *proto)
|
|||||||
|
|
||||||
ItemProto *ObjMgr::GetItemProto(uint32 entry)
|
ItemProto *ObjMgr::GetItemProto(uint32 entry)
|
||||||
{
|
{
|
||||||
if(_iproto.find(entry) != _iproto.end())
|
ItemProtoMap::iterator it = _iproto.find(entry);
|
||||||
return _iproto[entry];
|
if(it != _iproto.end())
|
||||||
|
return it->second;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,8 +119,9 @@ void ObjMgr::Add(CreatureTemplate *cr)
|
|||||||
|
|
||||||
CreatureTemplate *ObjMgr::GetCreatureTemplate(uint32 entry)
|
CreatureTemplate *ObjMgr::GetCreatureTemplate(uint32 entry)
|
||||||
{
|
{
|
||||||
if(_creature_templ.find(entry) != _creature_templ.end())
|
CreatureTemplateMap::iterator it = _creature_templ.find(entry);
|
||||||
return _creature_templ[entry];
|
if(it != _creature_templ.end())
|
||||||
|
return it->second;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user