Пример #1
0
PyTuple *Character::GetSkillQueue() {
    // return skills from skill queue
    PyList *list = new PyList;

    SkillQueue::iterator cur, end;
    cur = m_skillQueue.begin();
    end = m_skillQueue.end();
    for(; cur != end; cur++)
    {
        SkillQueue_Element el;

        el.typeID = cur->typeID;
        el.level = cur->level;

        list->AddItem( el.Encode() );
    }

	// now encapsulate it in a tuple with the free points
	PyTuple *tuple = new PyTuple(2);
	tuple->SetItem(0, list);
	// sending 0, as done on retail, doesn't f**k up calculation for some reason
	// so we can take the same shortcut here
	tuple->SetItem(1, new PyInt(0));

    return tuple;
}
Пример #2
0
PyList *Character::GetSkillQueue() {
    // return skills from skill queue
    PyList *list = new PyList;

    SkillQueue::iterator cur, end;
    cur = m_skillQueue.begin();
    end = m_skillQueue.end();
    for(; cur != end; cur++)
    {
        SkillQueue_Element el;

        el.typeID = cur->typeID;
        el.level = cur->level;

        list->AddItem( el.Encode() );
    }

    return list;
}