|
- procedure TFrmDll.BitBtn5Click(Sender: TObject); //修改人物物品属性 2015-6-17
- var
- Actor: TActor;
- I, Index: Integer;
- ListMemItem: TListMemItem;
- AItem: PTUserItem;
- AStditem: PTStdItem;
- S: string;
- begin
- Index := ListBox2.ItemIndex;
- if Index = -1 then Exit;
- Actor := GetSelectHuman;
- if not Assigned(Actor) then Exit;
- ListMemItem := TListMemItem(ListBox2.Items.Objects[Index]);
- if Assigned(ListMemItem) then
- begin
- if Actor.UserName <> ListMemItem.UserName then Exit;
- AItem := nil;
- S := '';
- if ListMemItem.Mode >= $1000 then
- begin
- for I := Actor.SaveItems.Count - 1 downto 0 do
- begin
- if PTUserItem(Actor.SaveItems.Items[I]).MakeIndex = ListMemItem.DBItem.MakeIndex then
- begin
- AItem := PTUserItem(Actor.SaveItems.Items[I]);
- AStditem := EiFunc.UserEngine.GetStdItem(AItem.Index);
- if Assigned(AStditem) then
- begin
- S := EiFunc._GetStrByShortStr(@AStditem.Name);
- S := Format('(仓库)%s', [S]);
- break;
- end;
- end;
- end;
- end else if ListMemItem.Mode >= $100 then
- begin
- for I := 0 to $A do
- begin
- if (Actor.UseItems[I].Index <> 0) and (Actor.UseItems[I].MakeIndex = ListMemItem.DBItem.MakeIndex) then
- begin
- AItem := @Actor.UseItems[I];
- S := tbItemUseNames[I];
- break;
- end;
- end;
- end else
- begin
- for I := Actor.ItemList.Count - 1 downto 0 do
- begin
- if PTUserItem(Actor.ItemList.Items[I]).MakeIndex = ListMemItem.DBItem.MakeIndex then
- begin
- AItem := PTUserItem(Actor.ItemList.Items[I]);
- AStditem := EiFunc.UserEngine.GetStdItem(AItem.Index);
- if Assigned(AStditem) then
- begin
- S := EiFunc._GetStrByShortStr(@AStditem.Name);
- S := Format('(包裹)%s', [S]);
- break;
- end;
- end;
- end;
- end;
- if Assigned(AItem) then
- begin
- AItem.Dura := Min(High(Word), StrToIntDef(Edit14.Text, AItem.Dura));
- AItem.DuraMax := Min(High(Word), StrToIntDef(Edit15.Text, AItem.DuraMax));
- AItem.ColorR := Min(High(Byte), StrToIntDef(Edit16.Text, AItem.ColorR));
- AItem.ColorG := Min(High(Byte), StrToIntDef(Edit17.Text, AItem.ColorG));
- AItem.ColorB := Min(High(Byte), StrToIntDef(Edit18.Text, AItem.ColorB));
- ZeroMemory(@AItem.Prefix, 12);
- StrPCopy(@AItem.Prefix, Copy(Edit19.Text, 1, 12)); //Copy是复制Char字符
- for I := 0 to $D do
- begin
- AItem.Desc[I] := Min(High(Byte), StrToIntDef(StringGrid1.Cells[1, I + 1], AItem.Desc[I]));
- end;
- if ListMemItem.Mode >= $100 then
- Actor.SendUseItems
- else Actor.SendBagItems;
- Actor.SysMsg(Format('管理员正在调整你的 %s 装备属性。', [S]), 2);
- GetHumanInfo(Actor);
- end;
- end;
- end;
复制代码
获取EI3.0插件代码5.0插件Delphi源码
|
上一篇:传奇Wil客户端编辑器Delphi源代码下一篇:老C插件版Lyy冷雨夜登录器Delphi源码,King1.4
|